Edgewall Software
Modify

Ticket #2409 (closed enhancement: fixed)

Opened 6 years ago

Last modified 5 years ago

Configurable default custom query

Reported by: cdleonard@… Owned by: nkantrowitz
Priority: normal Milestone: 0.11
Component: ticket system Version: devel
Severity: minor Keywords: olpc
Cc: dserodio@…, mccutchen@…, jashugan@…, sdyson@…
Release Notes:
API Changes:

Description

It would be really usefull to be able to configure the default query (the one you get from ViewTickets? with the report module disabled]. This probably needs #1467 first.

Attachments

olpc_default_query.patch (2.9 KB) - added by nkantrowitz 5 years ago.
Patch for controlling the default query directly. (against r5255)
olpc_default_query2.diff (2.7 KB) - added by nkantrowitz 5 years ago.
Swap string.Template with .replace()

Download all attachments as: .zip

Change History

comment:1 Changed 6 years ago by dserodio@…

  • Cc dserodio@… added

comment:2 Changed 6 years ago by anonymous

  • Cc mccutchen@… added

comment:3 Changed 6 years ago by anonymous

  • Cc jashugan@… added

comment:4 Changed 6 years ago by jashugan@…

I think I may have found a possible work-around. Instead of disabling the report module, remove all permissions to the report module for everyone. This will prevent "View Tickets" from appearing in the main navigation menu. Then download and install the NavAddPlugin from here: http://trac-hacks.org/wiki/NavAddPlugin . You can then add the following to the trac configuration file of any project:

[navadd]
add_items = opentickets,closedtickets
opentickets.title = Open Tickets
opentickets.url = /helpdesk/query?status=new&status=assigned&status=reopened&group=owner&order=priority
opentickets.perm = WIKI_VIEW
opentickets.target = mainnav
closedtickets.title = Closed Tickets
closedtickets.url = /helpdesk/query?status=closed&group=type&order=modified
closedtickets.perm = WIKI_VIEW
closedtickets.target = metanav

[components]
navadd.* = enabled

The only problem with this method is that the menu item doesn't get highlighted when active when added to the main navigation menu.

comment:5 Changed 5 years ago by cboos

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

Would be possible by configuring a saved custom query (#1735) as being the default report.

Superseded by #1925.

comment:6 Changed 5 years ago by anonymous

  • Cc sdyson@… added

comment:7 Changed 5 years ago by nkantrowitz

  • Keywords olpc added
  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Version changed from 0.9 to devel

I am reopening this as real support for adjusting the default query settings would be nice. Attached is a patch that should maintain the previous behavior by default.

Changed 5 years ago by nkantrowitz

Patch for controlling the default query directly. (against r5255)

comment:8 Changed 5 years ago by cboos

  • Milestone set to 0.11
  • Owner changed from jonas to cboos
  • Status changed from reopened to new

Ok for the feature, but I'm not sure it's worth using string.Template here: there's only one substitution to make, the escape rule doesn't seem useful to me (who would have a real user named $USER?) and it's a Python 2.4 thing. So I think it's better to use a simple replace('$USER', user) call.

Changed 5 years ago by nkantrowitz

Swap string.Template with .replace()

comment:9 Changed 5 years ago by nkantrowitz

New version with that change.

comment:10 Changed 5 years ago by cboos

  • Owner changed from cboos to nkantrowitz

This supersedes #4554.

The patch looks good, please apply.

comment:11 Changed 5 years ago by nkantrowitz

  • Resolution set to fixed
  • Status changed from new to closed

Commited in [5578]

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from nkantrowitz. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.