Due to posting problems on the ticket system, I continue the ticket discussion here:
http://trac.edgewall.org/ticket/4019#comment:4 Replying to [comment:4 mgood]: > I'm -1 on this. The `get_ticket_fields` function is intended for fields that > should be > user-editable. a) if so, than it should be renamed to "get_editable_ticket_fields" b) the function is used in _directly_ in context of the query, as stated above: http://trac.edgewall.org/browser/trunk/trac/ticket/query.py?rev=3935#L51 > The `Ticket` model class has attributes `time_created` and `time_changed` > for accessing that information. The ticket model is not relevant in this context (defect of the query which '''uses''' get_ticket_fields and the original field names). >I don't have problem with the query supporting filtering or sorting by the >creation >or changed date/time, but I don't think it requires adding those to >`get_ticket_fields`. get_ticket_fields(all_fields=False) seems to be the most non-intrusive way to solve this. - This patch, together with a few further non-intrusive patches, solves this task: http://dev.lazaridis.com/base/wiki/PlanTicketQueryMacro the result: this allows e.g. usage of the code below within a wiki page (latest-changed ticket is displayed on top of the result table, showing a correct datetime): #within a wiki page testing order=changetime&desc=1 [[TicketQuery(status=assigned|new|reopened&reporter=$USER&order=changetime&desc=1, format=table )]] # All patches can be refined during a further rework (e.g. in collaboration with cboos during introduction of the datetime changes to the query system). . --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-dev -~----------~----~----~----~------~----~------~--~---
