Changes between Initial Version and Version 2 of Ticket #8496
- Timestamp:
- Feb 13, 2011, 5:36:39 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #8496
-
Property
Summary
changed from
Big change to the child table functionality
to[Patch] Big change to the child table functionality
-
Property
Type
changed from
defect
toenhancement
-
Property
Severity
changed from
normal
tominor
-
Property
Summary
changed from
-
Ticket #8496 – Description
initial v2 1 1 I've made a major change to the way that childticketsplugin handles the table of children. It has a few drawbacks but the benefits are very significant. I think it needs someone else to look over it and come up with some ways to tidy it up. changes are as follows: 2 * Removed the child table completely - The code was building a table in full when trac has the wiki engine to do this3 * Added a custom field called childreport4 * Added a ticket_created and ticket_changed handler to update the childreport of the parent ticket with aTicketQuery macro2 * Removed the child table completely - The code was building a table in full when trac has the wiki engine to do this 3 * Added a custom field called childreport 4 * Added a ticket_created and ticket_changed handler to update the childreport of the parent ticket with a !TicketQuery macro 5 5 6 6 There are a few caveats. 7 * If you change the macros, the parent does not get updated until you update a child.8 * The ticket_custom table is updated every time a ticket is changed, regardless of whether it needs to be9 * You cannot edit the childreport macro, it will always be overwritten when a child is modified7 * If you change the macros, the parent does not get updated until you update a child. 8 * The ticket_custom table is updated every time a ticket is changed, regardless of whether it needs to be 9 * You cannot edit the childreport macro, it will always be overwritten when a child is modified 10 10 11 11 Benefits are pretty simple 12 * Allows you to use wiki macros to define the table, i.e. grouping and data on rows13 * The wikitext field can also be used in custom queries12 * Allows you to use wiki macros to define the table, i.e. grouping and data on rows 13 * The wikitext field can also be used in custom queries 14 14 15 15 There are a few things I don't like. The code to handle the table_headers definition is a bit obscure. I've used a closure as it saves a bit of extra coding when i'm getting configuration directives but its not particularly readable. I've also not properly handled migrating from the child table to my version. Maybe we could add a config directive to tell it to use a field instead of rendering a table. 16 16 17 Screenshot of the ticket screen is also attached along with a diff 17 Screenshot of the ticket screen is also attached along with a diff. 18 18 19 19 Pete