Edgewall Software
Modify

Opened 15 years ago

Last modified 14 years ago

#9255 new defect

Links from reports do not support dynamic variables

Reported by: mpotter@… 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%3FCUSTOMER%3DAcme instead of http://trac-host-base/report/15?CUSTOMER=Acme

Attachments (0)

Change History (4)

comment:1 by mpotter@…, 15 years ago

Another report example, one that is usable without the 'customer' custom field:

SELECT DISTINCT
  owner,
  '7?USER=' || owner AS report,
  'report' AS _realm,
  '7?USER=' || owner AS id
FROM ticket
ORDER BY
  owner

comment:2 by mpotter@…, 15 years ago

Version: 0.11.60.11.7

0.11.7 was not available with filed.

comment:3 by Christian Boos, 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 anonymous, 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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.