Trac does not check for conflicts with custom fields, Action box disappears
If I create a custom ticket field by editing trac.ini, Trac does not check to see if the name of my custom field conflicts with the name of one of the stock fields.
For instance, if I create a field named 'status', anytime I make a change to the ticket that results in the stock 'status' field being changed, trying to submit the change results in an SQLite index violation error ("columns ticket, time field are not unique").
I don't know if it would be better to automatically check for these conflicts, or just named all custom fields custom_something.
Change History
(11)
Summary: |
Trac does not check for conflicts with custom fields → Trac does not check for conflicts with custom fields, Action box disappears
|
Keywords: |
custom fields added
|
Milestone: |
→ 0.12
|
Milestone: |
0.12 → 0.11
|
Owner: |
changed from Jonas Borgström to Christian Boos
|
Owner: |
changed from Christian Boos to osimons
|
Milestone: |
0.11-retriage → 0.11.3
|
Owner: |
changed from osimons to Remy Blank
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
The behavior in Trac 0.9 has changed. The entire Action box now disappears if there's a custom field named 'status', making it impossible to accept or close tickets. New or upgrading users can run into this, and the cause isn't obvious, especially since this worked for the most part under 0.8. (Specifically, everything worked under 0.8 unless the user both changed the custom status field and selected a ticket action in one form submission, which would result in the 'not unique' error message. Doing the same thing in two steps worked perfectly.)
At least one other person on the Trac mailing list apart from me encountered this when we upgraded to 0.9. Renaming the custom field (and running an UPDATE statement on the database to convert the old data) fixed it. The need for more status values is probably common, and naming a custom field 'status' isn't explicitly disallowed by the current documentation, so I'd expect others could run into this too.
I'd submit a patch to either the code or documentation, but I don't know which route the Trac developers would prefer.
—Andrew Shearer