Edgewall Software

Ticket #2821 (closed enhancement: fixed)

Opened 3 years ago

Last modified 16 months ago

Ability to customize column results in a filter/query

Reported by: aroach@… Owned by: cboos
Priority: high Milestone: 0.11
Component: report system Version: 0.9.4
Severity: normal Keywords: custom formatting
Cc: rhind@…, daved@…

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

Change History

  Changed 2 years ago by Russell Hind <rhind@…>

  • 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

  Changed 2 years ago by David Adler

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).

  Changed 2 years ago by anonymous

  • cc daved@… added

  Changed 2 years ago by JoshuaFranklin

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.

  Changed 2 years ago by cboos

  • milestone set to 1.0

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

  Changed 2 years ago by anonymous

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 

follow-up: ↓ 10   Changed 21 months ago by 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.

  Changed 21 months ago by anonymous

  • keywords custom formatting added

  Changed 20 months ago by eoin.dunne@…

  • priority changed from normal to high

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   Changed 20 months ago by cboos

  • milestone changed from 1.0 to 0.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.

  Changed 19 months ago by writetodan@…

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.

  Changed 19 months ago by writetodan@…

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

follow-up: ↓ 14   Changed 19 months ago by cboos

  • owner changed from daniel to cboos
  • status changed from new to assigned

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 ; follow-up: ↓ 15   Changed 19 months ago by alexandre.franke@…

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 ; follow-up: ↓ 16   Changed 19 months ago by cboos

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 ; follow-up: ↓ 17   Changed 19 months ago by anonymous

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 ; follow-up: ↓ 18   Changed 19 months ago by cboos

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   Changed 19 months ago by alexandre.franke@…

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.

  Changed 17 months ago by ecarter

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

  Changed 16 months ago by anonymous

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

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

  Changed 16 months ago by dharris <dharris+trac@…>

For reference, this merge was in changeset:5413

Add/Change #2821 (Ability to customize column results in a filter/query)

Author



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