[Rt-commit] rt branch, 5.0/group-selfservice-watcher-limit, created. rt-5.0.0-14-ga500afd04a

? sunnavy sunnavy at bestpractical.com
Fri Sep 4 16:50:44 EDT 2020


The branch, 5.0/group-selfservice-watcher-limit has been created
        at  a500afd04a45961acd23586d7fe87fcc00b2cc60 (commit)

- Log -----------------------------------------------------------------
commit a500afd04a45961acd23586d7fe87fcc00b2cc60
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Sep 5 04:23:56 2020 +0800

    Search group itself for SelfService "My group's tickets"
    
    Previously we used "WatcherGroup", which was actually to search tickets
    whose roles have any user members of the group in question, instead of
    the group itself. E.g. for group "security" that has "alice" as a
    member.
    
        Ticket 1:
            Requestor: alice
    
        Ticket 2:
            Requestor: security
    
    "WatcherGroup" gets both tickets(alice is also requestor of ticket 2 via
    "security"), while "Watcher" only gets ticket 2, which is what we really
    want.

diff --git a/share/html/SelfService/Elements/MyGroupRequests b/share/html/SelfService/Elements/MyGroupRequests
index 70fa2456c6..01c180cd28 100644
--- a/share/html/SelfService/Elements/MyGroupRequests
+++ b/share/html/SelfService/Elements/MyGroupRequests
@@ -85,12 +85,12 @@ if ( $groups_obj->Count ){
     # Confirm we got a group. Count can report available groups, but
     # if the current user doesn't have SeeGroup, it won't be loaded.
     if ( $group ){
-        $Query = "(( WatcherGroup = " . $group->Id . " )";
+        $Query = "(( Watcher = " . $group->Id . " )";
     }
 
     # Handle multiple groups
     while ( $group = $groups_obj->Next ){
-        $Query .= " OR ( WatcherGroup = " . $group->Id . " )";
+        $Query .= " OR ( Watcher = " . $group->Id . " )";
     }
 
     $Query .= ")" if $Query;

-----------------------------------------------------------------------


More information about the rt-commit mailing list