Edgewall Software
Modify

Ticket #9255 (new defect)

Opened 22 months ago

Last modified 17 months ago

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:
Release Notes:
API 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

Change History

comment:1 Changed 22 months ago by mpotter@…

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 Changed 22 months ago by mpotter@…

  • Version changed from 0.11.6 to 0.11.7

0.11.7 was not available with filed.

comment:3 Changed 17 months ago by cboos

  • Milestone set to 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 Changed 17 months ago by anonymous

  • Summary changed from Report links from reports with dynamic variables do not work. to 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
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from (none). Next status will be 'new'
The owner will be changed from (none) to anonymous. Next status will be 'assigned'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.