[Rt-commit] rt 03/03: Don't mark fields in JOIN conditions as limited

sunnavy sunnavy at bestpractical.com
Mon Aug 9 19:18:03 UTC 2021


This is an automated email from the git hooks/post-receive script.

sunnavy pushed a commit to branch 4.4/ticket-search-unread-messages
in repository rt.

commit 500db6b99d65c5b039d58b0aaa48cc3388886f48
Author: sunnavy <sunnavy at bestpractical.com>
AuthorDate: Fri Jul 30 01:00:26 2021 +0800

    Don't mark fields in JOIN conditions as limited
    
    As we limit Transactions.Type in _HasUnreadMessagesLimit, without this
    change, "Type" would be marked as explicitly limited and the default
    implicit limit "Type = 'ticket'" wouldn't be applied.
---
 lib/RT/Tickets.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/RT/Tickets.pm b/lib/RT/Tickets.pm
index 6c46e15f5a..294de633c7 100644
--- a/lib/RT/Tickets.pm
+++ b/lib/RT/Tickets.pm
@@ -1788,7 +1788,7 @@ sub Limit {
         if $self->{parsing_ticketsql} and not $args{LEFTJOIN};
 
     $self->{_sql_looking_at}{ lc $args{FIELD} } = 1
-        if $args{FIELD} and (not $args{ALIAS} or $args{ALIAS} eq "main");
+        if $args{FIELD} and (not $args{ALIAS} or $args{ALIAS} eq "main") and not $args{LEFTJOIN};
 
     $self->SUPER::Limit(%args);
 }

-- 
To stop receiving notification emails like this one, please contact
sysadmin at bestpractical.com.


More information about the rt-commit mailing list