Opened 15 years ago
Last modified 14 years ago
#9255 new defect
Links from reports do not support dynamic variables
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | unscheduled |
Component: | report system | Version: | 0.11.7 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Using the following SQL report, the links generated are not correct. I realize that this specific report may serve no purpose once I upgrade to 0.12; it is given as a simple example to demonstrate the issue.
SELECT DISTINCT value AS customer, '15?CUSTOMER=' || value AS report, 'report' AS _realm, '15?CUSTOMER=' || value AS id FROM ticket_custom WHERE name = 'customer' ORDER BY customer
This report tries to use both the 'report' as a column name (a feature that does not appear to be documented) and the 'report' realm feature of the SQL report system. Both give the same results.
Example: If the resulting report link was for {15?CUSTOMER=Acme}
the resulting link points to http://trac-host-base/report/15
%3F
CUSTOMER
%3D
Acme
instead of http://trac-host-base/report/15
?
CUSTOMER
=
Acme
Attachments (0)
Change History (4)
comment:1 by , 15 years ago
comment:3 by , 14 years ago
Milestone: | → unscheduled |
---|
Sounds more like a hack not fully working than an actual defect. You should come up with a patch if you expect this to get fixed one day.
comment:4 by , 14 years ago
Summary: | Report links from reports with dynamic variables do not work. → Links from reports do not support dynamic variables |
---|
Similarly for the wiki realm:
-- Wiki pages modified by the current user. -- Version is the highest version that the user modified. SELECT "wiki" AS _realm, name || "?version=" || max(version) AS id, max(version) AS Version, time AS date, time, comment FROM wiki WHERE author='$USER' GROUP BY name
Another report example, one that is usable without the 'customer' custom field: