Modify

Opened 15 years ago

Closed 4 years ago

#6941 closed defect (worksforme)

Custom report query error, used SqlQueryMarco with Multiprojects - ComprehensiveSolution

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

Description (last modified by Ryan J Ollos)

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

{{{
#!SQL
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 p.name = t.priority AND p.type = 'priority'
  ORDER BY CAST(p.value AS int), milestone, t.type, time;
}}}

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 (3)

comment:5 Changed 9 years ago by Ryan J Ollos

Cc: Dave Abrahams removed

comment:6 Changed 8 years ago by Ryan J Ollos

Description: modified (diff)

comment:7 Changed 4 years ago by Ryan J Ollos

Resolution: worksforme
Status: newclosed
Summary: Custom report query error, used SqlQueryMarco with Multiproejcts - ComprehensiveSolutionCustom report query error, used SqlQueryMarco with Multiprojects - ComprehensiveSolution

Please try after the patch in #12023 is implemented.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain James Mills.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.