Edgewall Software
Modify

Ticket #6095 (closed defect: duplicate)

Opened 5 years ago

Last modified 4 years ago

Attempting to rename priority can get a unique constraint violation

Reported by: s.dallaway@… Owned by: jonas
Priority: low Milestone:
Component: general Version: 0.10.4
Severity: minor Keywords:
Cc:
Release Notes:
API Changes:

Description (last modified by eblot) (diff)

If you stupidly use the web admin module (looks neat BTW) to rename a priority to an existing name you get a unique constraint violation.

Traceback (most recent call last):
  File "C:\Program Files\Python 2.4\Lib\site-packages\trac\web\main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "C:\Program Files\Python 2.4\Lib\site-packages\trac\web\main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "c:\program files\python 2.4\lib\site-packages\tracwebadmin-0.1.2dev_r5911-py2.4.egg\webadmin\web_ui.py", line 119, in process_request
    path_info)
  File "c:\program files\python 2.4\lib\site-packages\tracwebadmin-0.1.2dev_r5911-py2.4.egg\webadmin\ticket.py", line 310, in process_admin_request
    enum.update()
  File "C:\Program Files\Python 2.4\Lib\site-packages\trac\ticket\model.py", line 400, in update
    (self.name, self.value, self.type, self._old_name))
  File "C:\Program Files\Python 2.4\Lib\site-packages\trac\db\util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "C:\Program Files\Python 2.4\Lib\site-packages\trac\db\util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
IntegrityError: duplicate key violates unique constraint "enum_pk"

Attachments

Change History

comment:1 Changed 5 years ago by eblot

  • Description modified (diff)

Please fill in the version field with the appropriate value.

comment:2 Changed 5 years ago by Simon Dallaway <s.dallaway@…>

  • Version set to 0.10.4

comment:3 Changed 4 years ago by cboos

  • Resolution set to duplicate
  • Status changed from new to closed

Still present in trunk. This should be fixed in a more general way, see #6348.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.