On Monday, April 23, 2018 at 11:58:30 PM UTC-7, Mo wrote:
>
> Hi,
>
> we are using Trac-1.2 and starting to use the milestone feature.
> There is one issue, when using a report or custom query, it's only 
> possible to see the milestone name in the list. Is it possible to show the 
> due date or days left in the ticket list? Is is more important than the 
> milestone name. We could write the due date into the milestone name, but 
> that would mean data duplication and must be synchronized.
>
> Best regards.
>

The following is a modification of Report {3} to show the milestone due 
date in the header. It should work at least for SQLite. It formats 
milestones with no due dates to have a due date of 01/01/1970. You'll need 
to add conditional logic to handle that scenario.

SELECT p.value AS __color__,
   'Milestone '||t.milestone||' (due: 
'||DATE(m.due/1000000,'unixepoch')||')' AS __group__,
   t.id AS ticket, t.summary, t.component, t.version, t.type AS type,
   t.owner, t.status,
   t.time AS created,
   t.changetime AS _changetime, t.description AS _description,
   t.reporter AS _reporter
  FROM ticket t
  LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
  LEFT JOIN milestone m on m.name = t.milestone
  WHERE status <> 'closed'
  ORDER BY (t.milestone IS NULL),t.milestone, CAST(p.value AS integer), 
t.type, t.time






More info here:
https://trac.edgewall.org/wiki/TracReports#Customformattingcolumns

- Ryan 

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to