Opened 17 years ago
Closed 17 years ago
#7200 closed enhancement (wontfix)
automatic custom-field-initialisation for old tickets
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | ticket system | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
After definition of a new custom field old tickets should get automatically initialised with the default value, assumed one was provided upon creation. Although there is a SQL script provided at TracTicketsCustomFields#Updatingthedatabase I believe this functionality should be built-in.
Currently old tickets have no value for a new custom field, which makes it hard to build queries based on this custom field. To make matters worse, the patch from #879 somehow got lost in the course of time (using reports it is possible, though, but these are deprecated).
As Trac needs to parse its ini-file regularly anyway, why not include a listener that updates the ticket_custom
-table accordingly whenever there is a new custom field?
There's no regression on #879 as far I can tell.
As for setting up the default value for existing tickets, I think it's better to not do it: if there's a mistake in the value or the trac.ini file is just saved in the middle of a more complete change, this may trigger this mass update of tickets…
I think that if we can make ticket updates works the way expected (see #4061), this is a better solution, together with #525.