-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure TicketType and ObjectType limits in transaction searches ar…
…e AND-ed To add TicketType='ticket' and ObjectType="RT::Ticket" preconditions, previously we wrapped user's TxnSQL with only if it doesn't contain outer parens, of which the regex check was not quite accurate. E.g. ( Type = 'Set' ) OR ( Type = 'Correspond' ) It matches the regex(qr/^\s*\(.*\)$/) but actually we still need to wrap it so the final TxnSQL could be: TicketType = 'ticket' AND ObjectType = 'RT::Ticket' AND ( ( Type = 'Set' ) OR ( Type = 'Correspond' ) ) Otherwise all Set/Correspond transactions would be included in search result. To fix the issue above, this commit parses user's TxnSQL to wrap it as long as the root condition is "OR".
- Loading branch information
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters