Edgewall Software
Modify

Opened 16 years ago

Closed 15 years ago

Last modified 10 years ago

#7806 closed enhancement (fixed)

Add ability to link report groups to a custom URL

Reported by: joshua.hoke@… Owned by: joshua.hoke@…
Priority: normal Milestone: 0.12
Component: report system Version: none
Severity: normal Keywords: reports links groups consider
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

We use a report configured to display a small amount of information for each group, and wanted to be able to click on the group header to go to another report in case further information was needed.

The patch I ended up using adds support for a __grouplink__ column in SQL queries; if present, its contents are used as the target HREF for the group header.

It would be nice if it was possible to use TracLinks for this field as well, but it wasn't immediately obvious to me how to invoke the parser for those.

I will attach the patch I used.

Attachments (3)

trac-grouplink-patch.diff (1.9 KB ) - added by JoshuaH@… 16 years ago.
simple grouplink patch
trac-grouplink-patch-2.diff (1.7 KB ) - added by JoshuaH@… 16 years ago.
Simple grouplink patch
trac-grouplink-patch-3.diff (2.9 KB ) - added by joshua.hoke@… 16 years ago.
Patch incorporating documentation update

Download all attachments as: .zip

Change History (15)

by JoshuaH@…, 16 years ago

Attachment: trac-grouplink-patch.diff added

simple grouplink patch

comment:1 by Christian Boos, 16 years ago

Keywords: consider added
Milestone: 0.13

Have a look at py:strip ;-)

Also, instead of the has_key, rather use '__grouplink__' in ....

by JoshuaH@…, 16 years ago

Attachment: trac-grouplink-patch-2.diff added

Simple grouplink patch

comment:2 by JoshuaH@…, 16 years ago

Thanks for the tips. I have attached a revised patch.

comment:3 by Christian Boos, 16 years ago

Milestone: 0.130.12
Owner: set to Christian Boos

Great! Now what would be perfect would be an updated documentation (wiki:0.12/TracReports#Customformattingcolumns).

by joshua.hoke@…, 16 years ago

Attachment: trac-grouplink-patch-3.diff added

Patch incorporating documentation update

comment:4 by joshua.hoke@…, 16 years ago

Once again, I have attached a revised patch incorporating your suggestion. I have only tested the
SQL string concatenation syntax in the example query with SQLite, though.

comment:5 by Christian Boos, 16 years ago

Nice patch, thanks!

I just wonder how <a href="${row_group[0]['__grouplink__']}... behaves in Genshi strict mode in case __grouplink__ is not there. I need to check that (not that we support strict mode, but better tend to do so).

comment:6 by Remy Blank, 15 years ago

Owner: changed from Christian Boos to Remy Blank

I'll have a look at that.

comment:7 by Remy Blank, 15 years ago

Slightly corrected patch applied in [8710], thanks!

comment:8 by Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

Documentation updated in 0.12/TracReports@2.

comment:9 by Remy Blank, 15 years ago

Owner: changed from Remy Blank to joshua.hoke@…

in reply to:  5 comment:10 by Remy Blank, 15 years ago

Replying to cboos:

I just wonder how <a href="${row_group[0]['__grouplink__']}... behaves in Genshi strict mode in case __grouplink__ is not there.

I forgot to mention that I have tested this patch in Genshi strict mode, and the reports are displayed correctly, with and without __grouplink__. Actually, many pages are (I came across a missing xhr in the source browser, then I stopped).

comment:11 by Ryan J Ollos, 10 years ago

Reporter: changed from JoshuaH@… to joshua.hoke@…

comment:12 by Ryan J Ollos, 10 years ago

Owner: changed from joshua.hoke@… to joshua.hoke@…

Modify Ticket

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