#7806 closed enhancement (fixed)
Add ability to link report groups to a custom URL
Reported by: | Owned by: | ||
---|---|---|---|
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)
Change History (15)
by , 16 years ago
Attachment: | trac-grouplink-patch.diff added |
---|
comment:1 by , 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 ...
.
comment:3 by , 16 years ago
Milestone: | 0.13 → 0.12 |
---|---|
Owner: | set to |
Great! Now what would be perfect would be an updated documentation (wiki:0.12/TracReports#Customformattingcolumns).
by , 16 years ago
Attachment: | trac-grouplink-patch-3.diff added |
---|
Patch incorporating documentation update
comment:4 by , 16 years ago
SQL string concatenation syntax in the example query with SQLite, though. |
follow-up: 10 comment:5 by , 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:8 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Documentation updated in 0.12/TracReports@2.
comment:9 by , 15 years ago
Owner: | changed from | to
---|
comment:10 by , 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 , 10 years ago
Reporter: | changed from | to
---|
comment:12 by , 10 years ago
Owner: | changed from | to
---|
simple grouplink patch