Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#4554 closed enhancement (duplicate)

Add configuration for default filters (constraints) for ticket queries

Reported by: lance_rushing@… 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  
    360360            # with no parameters. Instead show only open tickets, possibly
    361361            # associated with the user
    362362            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,)
    370371
    371372        query = Query(self.env, constraints, req.args.get('order'),
    372373                      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 Christian Boos, 18 years ago

Keywords: query added
Milestone: 0.11
Severity: normaltrivial

Should be default_user_filter instead, as it's only filtering on owner if the user is logged in, but filters on cc otherwise.

comment:2 by Christian Boos, 18 years ago

Milestone: 0.11
Resolution: duplicate
Status: newclosed

Superseded by #2409.

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.