Ticket #4554 (closed enhancement: duplicate)
Add configuration for default filters (constraints) for ticket queries
| Reported by: | lance_rushing@… | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | ticket system | Version: | 0.9.6 |
| Severity: | trivial | Keywords: | query |
| Cc: |
Description
Our ticket system doesn't need the owner filter applied by default.
I added a boolean config setting to remove the owner filter from the default filters.
Patch for version 0.9.6
-
query.py
old new 360 360 # with no parameters. Instead show only open tickets, possibly 361 361 # associated with the user 362 362 constraints = {'status': ('new', 'assigned', 'reopened')} 363 if req.authname and req.authname != 'anonymous': 364 constraints['owner'] = (req.authname,) 365 else: 366 email = req.session.get('email') 367 name = req.session.get('name') 368 if email or name: 369 constraints['cc'] = ('~%s' % email or name,) 363 if self.config.getbool('query', 'default_filter_owner'): 364 if req.authname and req.authname != 'anonymous': 365 constraints['owner'] = (req.authname,) 366 else: 367 email = req.session.get('email') 368 name = req.session.get('name') 369 if email or name: 370 constraints['cc'] = ('~%s' % email or name,) 370 371 371 372 query = Query(self.env, constraints, req.args.get('order'), 372 373 req.args.has_key('desc'), req.args.get('group'),
And trac.ini additions:
[query] default_filter_owner = false
I don't know if it might be better to create a default_filter array of some sort, but the boolean works for my current needs.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


