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: | 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)
Change History (2)
by , 19 years ago
Attachment: | report.patch added |
---|
comment:1 by , 19 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Searching for "$NOW" would've found ticket #2257 which provides a solution for doing date calculations in reports.
patch file