Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 16 years ago

#3510 closed enhancement (duplicate)

Query module lacks date/time features

Reported by: AKAQuinn@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.9.6
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

TracReports encourages me to see what I can do with reports but not query, so I did.

One of our reports is "Tickets closed within the last 30 days, by owner." It's handy for making monthly status reports and other bureaucratic nonsense. We're accomplishing the closed date in SQL like so: status = 'closed' AND changetime > (strftime('%%s', 'now') - (60 * 60 * 24 * 30))

As far as I can tell, there is no way to accomplish this with the query module, as it provides no access to the dates at all, not to mention comparison to values that change.

As per a way to add it? Well, it's complicated, so I don't know … but it is definitely a feature not occuring in the query module (at least in 0.9.6). Perhaps access to the timestamps directly, a variable for the current time, and some simple math, but that wouldn't be intuitive at all to people unoccustomed to UNIX timestamps.

Attachments (0)

Change History (4)

comment:1 by anonymous, 18 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #2288.

comment:2 by anonymous, 16 years ago

I added this condition to a REPORT, but it is returning ALL closed tickets. Could you send me the entire REPORT code so that I can figure out what I'm missing. I'd like to show all CLOSED tickets within the last 30 days also. Thanks!-Lisa

comment:3 by anonymous, 16 years ago

My email address: lisa@…

comment:4 by Christian Boos, 16 years ago

Sorry, I don't have the answer for your request concerning a SQL report, but more on the topic of this ticket (which is about the query module), this is how you could do it now in Trac trunk, using wiki:0.12/TracQuery#QueryLanguage:

[[TicketQuery(status=closed,resolution=fixed,modified=30daysago)]]

Although this way you could get tickets that have been closed earlier but modified in the last month. There's still currently no way to specify that the close event itself should have occurred in the last month.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström 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.