Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5941 closed defect (fixed)

daterange does not work for specified dates

Reported by: pellatt@… Owned by: Guillermo M Narvaja
Priority: normal Component: TicketStatsMacro
Severity: normal Keywords:
Cc: Trac Release: 0.12


I'm trying to create a graph for specific dates, but it doesn't work, e.g.

[[TicketStats(title = Total tickets last 6 months, height = 150, daterange=2009-01-01;2009-06-30,res_days=7)]]

This just throws an error:

Error: Macro TicketStats(title = Total tickets last 6 months, height = 150, daterange=2009-01-01;2009-06-30,res_days=7) failed

unsupported operand type(s) for -: 'NoneType' and 'datetime.timedelta'

I know the macro itself is working because a query for the last 6 months works fine, e.g.:

[[TicketStats(title = Total tickets last 6 months(per month), height = 150, daterange=6m,res_days=30)]]

Trac version is 0.12dev-r7984.

It's possible I just have the format wrong for the 'daterange' parameter, if so please put some examples up in the wiki.

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by anonymous

Resolution: fixed
Status: newclosed

Fixed on r6661

comment:2 Changed 9 years ago by anonymous

Works great now, thanks.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Guillermo M Narvaja.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.