Modify

Opened 7 years ago

Closed 7 years ago

#2163 closed enhancement (duplicate)

Add a filter by milestone

Reported by: chtaylo3@… Owned by: bobbysmith007
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

It would be really cool to include a milestone dropdown box that you could filter my milestone if one was selected, otherwise the default behavior as it exists now is implemented.

i've edited a few reports from the old 0.3.8 version for trac 10, but the dates aren't filtering ... lemme try and upgrade to the new version and see if that works .. then I'll try and tie in the dropdown box and submit a patch for you.

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by bobbysmith007

  • Status changed from new to assigned

Sorry for the delay, apparently trac-hacks has stopped emailing me new tickets for this project, so I had not seen anything opened in the last month or so.

I will look into this, but perhaps you would be better off using the /query interface for your needs in this department. I am a bit loath to reimplement something with that much depth and sophistication for this plugin. (It would be neat to have, but I do not really want to write it).

comment:2 Changed 7 years ago by chtaylo3@…

well, I've got something almost finished and then I realized that all we (my group) really needs is a Developer Work Summary By Milestone. I used your Developer Work Summary as a starting point and added a new field called charge number. Here's the sql:

SELECT author, milestone AS __group__, SUM(CAST(newvalue AS real)) AS TotalHoursCharges, chargenumbers.value AS ChargeNumber
FROM ticket_change
JOIN ticket t ON t.id = ticket_change.ticket
LEFT JOIN ticket_custom AS billable ON billable.ticket = t.id AND billable.name = 'billable'
LEFT JOIN ticket_custom AS chargenumbers ON chargenumbers.ticket = t.id AND chargenumbers.name = 'chargenumber'
WHERE field = 'hours' AND
 t.status IN ($NEW, $ASSIGNED, $REOPENED, $CLOSED) AND
 billable.value in ($BILLABLE, $UNBILLABLE) AND
 ticket_change.time >= $STARTDATE AND
 ticket_change.time < $ENDDATE
GROUP BY milestone, ChargeNumber, author

I also added a patch to include two report default variables in report.py: $TODAY and $NOW
this enabled me to write a report called "My Work Summary for Today". All I did for this one was to modify the starting Developer Work Summary by taking out the status check, billable check and replacing $STARTDATE with $TODAY and $ENDDATE with $NOW

lemme know if you think you'd like to include any of this with your plugin .. I imagine the first one would be easier b/c it doesn't require a patch. The second one I'm thinking you'd want to stay away from.

comment:3 Changed 7 years ago by bobbysmith007

  • Resolution set to duplicate
  • Status changed from assigned to closed

#2082 was here first for this so I am gonna leave that open.

Thanks for the effort, and great job figuring this out for yourself. However, I will probably change the report a bit when I start implementing so that it matches the other reports.

Russ

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from bobbysmith007. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.