Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2810 closed defect (fixed)

fails when used with report containing LIKE operator

Reported by: anonymous Owned by: gotoh
Priority: normal Component: TicketBoxMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10


Reports which contain something like the following work in the reports page, but fail with the TicketBox macro:

SELECT id AS ticket, summary FROM ticket

WHERE status IN ('new', 'assigned', 'reopened')

AND (owner='$USER' OR cc LIKE '%$USER%')

I guess that the problem is with the use of the % symbols in the LIKE string?

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by gotoh

  • Resolution set to fixed
  • Status changed from new to closed

(In [3423]) Fix to use ReportModule.sql_sub_vars() for the issue #2810. Old code is not good for query like "... LIKE '%$USER%'" on 0.10.x or 0.11 on replacing variables. Close #2810.

And also drop supporting for trac 0.8 or before.

comment:2 Changed 9 years ago by gotoh

I'd reproduced your issue and fix it in r3423. Try it please.

Add Comment

Modify Ticket

as closed The owner will remain gotoh.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.