Opened 7 years ago

Last modified 6 months ago

#6941 new defect

Custom report query error, used SqlQueryMarco with Multiproejcts - ComprehensiveSolution

Reported by: anonymous Owned by: JamesMills
Priority: normal Component: SqlQueryMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11


I used the trac 0.11 and postgresql to create multiproject environment. see ComprehensiveSolution I want to custom a query to run function under db. But when I Edit report as below

Error: Failed to load processor SQL
No macro or processor named 'SQL' found

Then it show the error message :

Report execution failed: syntax error at or near "{" LINE 1: SELECT COUNT(*) FROM ({{{

when I run query without SqlQueryMarco, it show the error message :

Report execution failed: syntax error at or near "to" LINE 2: set search_path to public,public;

Could you please help me to check this problem ? Thank you very much.

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by anonymous

set search_path to public,public; 
SELECT declare_multitrac_query(); 

SELECT p.value AS __color__,
   project, id AS ticket, summary, component, version, milestone, t.type AS type, 
   owner, status,
   time AS created,
   changetime AS _changetime, description AS _description,
   reporter AS _reporter
  FROM multitrac_query('status <> ''closed''') t 
  LEFT JOIN enum p ON = t.priority AND p.type = 'priority'
  ORDER BY CAST(p.value AS int), milestone, t.type, time;

comment:5 Changed 15 months ago by rjollos

  • Cc Dave Abrahams removed

Add Comment

Modify Ticket

as new The owner will remain JamesMills.

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

Note: See TracTickets for help on using tickets.