Edgewall Software

Ticket #2409 (closed enhancement: fixed)

Opened 3 years ago

Last modified 18 months 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@…

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 19 months ago.
Patch for controlling the default query directly. (against r5255)
olpc_default_query2.diff (2.7 KB) - added by nkantrowitz 19 months ago.
Swap string.Template with .replace()

Change History

Changed 3 years ago by dserodio@…

  • cc dserodio@… added

Changed 2 years ago by anonymous

  • cc mccutchen@… added

Changed 2 years ago by anonymous

  • cc jashugan@… added

Changed 2 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.

Changed 2 years ago by cboos

  • status changed from new to closed
  • resolution set to duplicate

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

Superseded by #1925.

Changed 23 months ago by anonymous

  • cc sdyson@… added

Changed 19 months ago by nkantrowitz

  • keywords olpc added
  • status changed from closed to reopened
  • version changed from 0.9 to devel
  • resolution duplicate deleted

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 19 months ago by nkantrowitz

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

Changed 19 months ago by cboos

  • owner changed from jonas to cboos
  • status changed from reopened to new
  • milestone set to 0.11

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 19 months ago by nkantrowitz

Swap string.Template with .replace()

Changed 19 months ago by nkantrowitz

New version with that change.

Changed 18 months ago by cboos

  • owner changed from cboos to nkantrowitz

This supersedes #4554.

The patch looks good, please apply.

Changed 18 months ago by nkantrowitz

  • status changed from new to closed
  • resolution set to fixed

Commited in [5578]

Add/Change #2409 (Configurable default custom query)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from nkantrowitz. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.