Modify ↓
Opened 18 years ago
Closed 18 years ago
#4554 closed enhancement (duplicate)
Add configuration for default filters (constraints) for ticket queries
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | ticket system | Version: | 0.9.6 |
Severity: | trivial | Keywords: | query |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
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 (0)
Change History (2)
comment:1 by , 18 years ago
Keywords: | query added |
---|---|
Milestone: | → 0.11 |
Severity: | normal → trivial |
comment:2 by , 18 years ago
Milestone: | 0.11 |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Superseded by #2409.
Note:
See TracTickets
for help on using tickets.
Should be default_user_filter instead, as it's only filtering on
owner
if the user is logged in, but filters oncc
otherwise.