Edgewall Software
Modify

Opened 18 years ago

Closed 17 years ago

Last modified 17 years ago

#2821 closed enhancement (fixed)

Ability to customize column results in a filter/query

Reported by: aroach@… Owned by: Christian Boos
Priority: high Milestone: 0.11
Component: report system Version: 0.9.4
Severity: normal Keywords: custom formatting
Cc: rhind@…, daved@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Much like when you create a SELECT statement, and you can choose what columns would like to return in the query — regardless of the constraints for the query — I'd like to request the ability to select what columns are displayed in a filter.

For example:

SELECT id, summary, component FROM ticket WHERE milestone = 'testmilestone';

Would display id, summary, and component in the recordset.

Now, if I tried this in the filter view, by including "component" I'm introducing another query constraint. In order to have all of the results to display "component", I have to keep adding components until I reach the end. There's no way for me to wildcard (that I'm aware of) because component is a selectbox.

Many thanks.

Attachments (0)

Change History (21)

comment:1 by Russell Hind <rhind@…>, 18 years ago

Cc: rhind@… added

Not sure if this should be a separate query or not, but we are effectively serving multiple projects from 1 svn repo and 1 trac database. Hence we have components such as:

Project1/Area1 Project1/Area2 Project2/Area1

I'm not up on SQL and like the simple filter interface, but would like to be able to enter freeform text and wildcards for values such as component so rather than having to add multiple component lines to the filer (which may not be updated when new areas are added), I'd like to be able to enter

Project1/*

Cheers

Russell

comment:2 by David Adler, 18 years ago

I second the request. I could imagine a user interface with a series of checkboxes for the user to specify which columns he wants to see in the results.

Related and also useful would be a way to specify globally what custom fields should appear by default in custom queries (and perhaps also in standard reports).

comment:3 by anonymous, 18 years ago

Cc: daved@… added

comment:4 by JoshuaFranklin, 18 years ago

I would also like to customize column results.

In our project we have different people working on different components, but the components interact. Therefore we have a saved query on our front page that includes several (grouped) components so the different groups can see what's happening with the other group. Showing the component in the results would make this more clear.

comment:5 by Christian Boos, 18 years ago

Milestone: 1.0

That's an often requested feature, we should implement this one day.

comment:6 by anonymous, 18 years ago

As a mitigation, you can make all columns display by using the following patch:

  • trac/ticket/query.py

     
    137137
    138138        # Only display the first eight columns by default
    139139        # FIXME: Make this configurable on a per-user and/or per-query basis
    140         self.cols = cols[:7]
    141         if not self.order in self.cols and not self.order == self.group:
     140        #self.cols = cols[:7]
     141        self.cols = cols
     142        #if not self.order in self.cols and not self.order == self.group:
    142143            # Make sure the column we order by is visible, if it isn't also
    143144            # the column we group by
    144             self.cols[-1] = self.order
     145            #self.cols[-1] = self.order
    145146
    146147        return self.cols

comment:7 by alexandra, 17 years ago

I second this request. I even tried the same underscore tricks that work for custom formatting for SQL custom reports, of course with no avail. So even just adding this to query language without any UI would be useful.

comment:8 by anonymous, 17 years ago

Keywords: custom formatting added

comment:9 by eoin.dunne@…, 17 years ago

Priority: normalhigh

This feature would be awsome. You could basically do away with the custom reports capability if you could specify which columns to display.

I'm bumping the priority on this issue.

in reply to:  7 comment:10 by Christian Boos, 17 years ago

Milestone: 1.00.11

Replying to alexandra:

I second this request. I even tried the same underscore tricks that work for custom formatting for SQL custom reports, of course with no avail. So even just adding this to query language without any UI would be useful.

Yes, that would be a first step. Related to #1735.

comment:11 by writetodan@…, 17 years ago

Nice one, i third it.

Trac does seem pretty crippled without the user able to query all info, e.g. if user wants to see the latest updates, but can't sort by update time, since column not visible.

comment:12 by writetodan@…, 17 years ago

(Okay latest updates is a bad example - i just found the timeline!)

comment:13 by Christian Boos, 17 years ago

Owner: changed from daniel to Christian Boos
Status: newassigned

r4784 implements the possibility to specify the columns using the new col parameter in the TracQuery language.

What's left to be done is an UI for selecting them in the query view itself.

in reply to:  13 ; comment:14 by alexandre.franke@…, 17 years ago

Replying to cboos:

What's left to be done is an UI for selecting them in the query view itself.

What's more Roadmap uses TracQuery to show open/closed tickets for a milestone. This should also be customizable.

in reply to:  14 ; comment:15 by Christian Boos, 17 years ago

Replying to alexandre.franke@gmail.com:

What's more Roadmap uses TracQuery to show open/closed tickets for a milestone. This should also be customizable.

That could be useful for specifying the columns one would like to display. This could perhaps be done with a "[milestone] base_query = ?...<query href>..." setting?

in reply to:  15 ; comment:16 by anonymous, 17 years ago

Replying to cboos:

That could be useful for specifying the columns one would like to display.

Exactly.

This could perhaps be done with a "[milestone] base_query = ?...<query href>..." setting?

Where would you change this setting from?

in reply to:  16 ; comment:17 by Christian Boos, 17 years ago

Replying to anonymous:

Replying to cboos:

This could perhaps be done with a "[milestone] base_query = ?...<query href>..." setting?

Where would you change this setting from?

A normal TracIni setting in the [milestone] section?

in reply to:  17 comment:18 by alexandre.franke@…, 17 years ago

Replying to cboos:

This could perhaps be done with a "[milestone] base_query = ?...<query href>..." setting?

Replying to alexandre.franke@gmail.com:

Where would you change this setting from?

Replying to cboos:

A normal TracIni setting in the [milestone] section?

Okay, seems nice.

comment:19 by Eli Carter, 17 years ago

I've thrown together a rough implementation in sandbox/ticket-2821 to get this rolling again. Feedback welcome.

comment:20 by anonymous, 17 years ago

Resolution: fixed
Status: assignedclosed

Changes merged to trunk. If further enhancements are desired, please open a new ticket.

comment:21 by dharris <dharris+trac@…>, 17 years ago

For reference, this merge was in changeset:5413

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos 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.