#11834 closed enhancement (fixed)
[Patch] add filtering by component to ticket statistics
Reported by: | Miguel Ferreira | Owned by: | Miguel Ferreira |
---|---|---|---|
Priority: | normal | Component: | TracTicketStatsPlugin |
Severity: | normal | Keywords: | Component, Ticket, Statistics |
Cc: | Trac Release: | 1.0 |
Description
This patch adds a combo box to the template populated with the Components, and filtering by component functionality to the main python file.
This was a useful feature for us.
Attachments (1)
Change History (6)
Changed 10 years ago by
Attachment: | add_component_filter.diff added |
---|
comment:1 Changed 10 years ago by
Status: | new → accepted |
---|
Looks good! I will try to get it applied soon.
comment:2 Changed 10 years ago by
I encountered an error on the Ticket Stats page with Trac 1.1.2dev:
Trac detected an internal error: TypeError: select() takes exactly 2 arguments (3 given)
File "/home/user/Workspace/tracdev/teo-rjollos.git/trac/web/main.py", line 530, in _dispatch_request dispatcher.dispatch(req) File "/home/user/Workspace/tracdev/teo-rjollos.git/trac/web/main.py", line 223, in dispatch resp = chosen_handler.process_request(req) File "/home/user/Workspace/trachacks.git/tracticketstatsplugin/trunk/ticketstats/ticketstats.py", line 163, in process_request TicketComponent.select(self.env, show_all)]
The issue is that the second argument to Component.select
was db
, and it has since been removed: select(cls, env, db=None)
-> select(cls, env)
. This would have had no consequences on Trac 1.0-stable, since the db
parameter was deprecated and unused.
Milestone.select
has a different signature: select(cls, env, include_completed=True, db=None)
(1.0-stable) -> select(cls, env, include_completed=True)
(1.2dev).
Also, your patch contained tab characters. You don't want to mix tabs and spaces in Python, and spaces are preferred.
No need to refresh the patch. I'll do some more testing later and commit it.
comment:3 Changed 10 years ago by
Good comments and thanks for having a look, I'll also test it with the new trac next week when back in front of a PC. Sorry for the tabs in the patch..
comment:5 Changed 10 years ago by
Owner: | changed from Ryan J Ollos to Miguel Ferreira |
---|
patch for component filtering, two files affected