Matt Good wrote:
> Ilias Lazaridis wrote:
> > Christian Boos wrote:
> > > Ilias Lazaridis wrote:
> > > > ...
> > > > 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).
> > >
> > > Those changes are in trunk now
> > > (http://trac.edgewall.org/changeset/4045), you may want to refresh your
> > > patches against them, and I'll take a look
> >
> > Only one patch has to be changed (the UI one to use http_date).
>
> An initial observation on your #45: it overwrites the "cols" list which
> has been previously created, which is probably not what you want to do.
(I wanted to override the default created cols-list by a user defined
cols-list. Possibly I was to 'brutal'.)
> I checked the patches to add the "Created" and "Modified" fields, but a
> side effect is that "Created" and "Modified" become available in the
> "Add filter" list, since it now thinks they're "text" fields of the
> ticket.
the "get_ticket_fields(get_all=True) should return "all ticket fields"
provided.
Subsystems should then autonomously disable fields they are not able
(or 'willing') to handle.
E.g. the function which fills the "add filter" drop-down-list should
disable the fields which are unsupported. For now, just disabling
'time' and 'datetime' (and enable them later when support is
implemented).
for 'non-breakage' reasons, "get_ticket_fields" returs the UI editable
fields of the ticket.
> I believe that the "workflow" branch contained at least the
> basis for supporting date fields, though I don't know what the status
> was, and it looks like it's going to take some work to get that branch
> back in sync with the trunk.
I assume the "type" there will be "datetime", too.
An additional change could be to introduce immediately the field-type
"datetime":
# DateTime fields
if (all_fields):
fields.append( {'name': 'time', 'type': 'datetime',
'label': 'Created'} )
fields.append( {'name': 'changetime', 'type': 'datetime',
'label': 'Modified'} )
> This patch will allow the use of "changetime" and "time" fields for
> sorting without putting them in "get_ticket_fields", so it avoids
> unwanted side effects:
[...] - (patch)
I've provided a similar patch initially, but it just 'patched' the code
to solve my problem:
http://trac.edgewall.org/attachment/ticket/3990/TicketQueryMacroTimeOrdering.diff
http://trac.edgewall.org/attachment/ticket/3990/TicketQueryMacroAddTimestampFormattingInt.diff
The 2nd patch (get_ticket_fields) is 'more correct' and is a
development patch.
It triggers a few followup issues (e.g. missing model/view separation)
which allow to add further functionality and cleanup the code in _tiny_
incremental steps.
As said in another thread, I am full-time available to continue work on
this and deal with upcoming issues.
-
(Of course, either patch-style 1 or patch-style 2 has the desired
effect (enabling query-ordering on time/datetime), thus both are ok.
But 99%, get_ticket_fields is the way to go.)
.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---