Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 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

Description

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 6 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 6 years ago by gotoh

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.