Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#3173 closed enhancement (duplicate)

A patch to add a $NOW dynamic variable to the reports

Reported by: gooli@… Owned by: daniel
Priority: normal Milestone:
Component: report system Version: 0.9.4
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I wanted to create a report that shows the tickets closed in the last 7 days, but couldn't find a way to do that. So I added the $NOW dynamic variable that has the value of int(time.time()).

It is now possible to use reports such as this one (that get's the tickets that have been closed in the last 7 days):

SELECT

id AS ticket, summary, changetime AS modified

FROM ticket WHERE $NOW - changetime < 7*24*60*60 AND status = 'closed'

The patch is against 0.9.4 and it applied to the tickets/report.py file in the get_var_args function.

Attachments (1)

report.patch (143 bytes ) - added by gooli@… 19 years ago.
patch file

Download all attachments as: .zip

Change History (2)

by gooli@…, 19 years ago

Attachment: report.patch added

patch file

comment:1 by Matthew Good, 19 years ago

Resolution: duplicate
Status: newclosed

Searching for "$NOW" would've found ticket #2257 which provides a solution for doing date calculations in reports.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain daniel.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from daniel to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.