Ticket #4447 (closed defect: fixed)
Custom ticket field edits from None to '' show as deletion
| Reported by: | thatch | Owned by: | thatch |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.11 |
| Component: | ticket system | Version: | devel |
| Severity: | normal | Keywords: | custom fields |
| Cc: |
Description
I started this on trac-dev but convinced myself that it was a real issue. See that message for steps to reproduce
Just as a followup, templates/ticket_view.html displays field_name deleted when a custom field goes from None to ''. This is caused by a custom field being added after a ticket is created. I don't believe this to be a change (much less a deletion) so propose the following:
-
trac/ticket/web_ui.py
849 849 else: 850 850 this_num = old 851 851 current['cnum'] = int(this_num) 852 el se:852 elif old or new: 853 853 current['fields'][field] = {'old': old, 'new': new} 854 854 if current: 855 855 yield current
The unit tests appear to still pass as expected.
The ticket_change table is storing:
434|1166731555|<my username>|due_date||
And pysqlite2 is giving me the tuple
(434, 1166731555, u'<my username>', u'due_date', None, u'')
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


