[Rt-commit] rt branch, 4.4/search-watcher-by-group-name, repushed

? sunnavy sunnavy at bestpractical.com
Thu Jun 3 18:21:54 EDT 2021


The branch 4.4/search-watcher-by-group-name was deleted and repushed:
       was a08bc079243e48bafc9bc7b2c66ea4aa90b333f7
       now 0d8c8b5306edf657edc9c17ff3e0a7c079985f14

1: 09f2808ca8 ! 1: f420227f0d Support to search user defined group names in watcher limit
    @@ -62,13 +62,20 @@
     -                @ids = $args{VALUE};
     -            }
     -            else {
    +-                my $groups = RT::Groups->new( RT->SystemUser );
    +-                $groups->LimitToUserDefinedGroups;
    +-                $groups->WithMember( PrincipalId => $args{VALUE}, Recursively => 1 );
    +-                @ids = ( $args{VALUE}, map { $_->id } @{ $groups->ItemsArrayRef } );
     +            my @ids = ref $args{VALUE} eq 'ARRAY' ? @{ $args{VALUE} } : $args{VALUE};
     +            if ( !$is_shallow ) {
    -                 my $groups = RT::Groups->new( RT->SystemUser );
    -                 $groups->LimitToUserDefinedGroups;
    -                 $groups->WithMember( PrincipalId => $args{VALUE}, Recursively => 1 );
    --                @ids = ( $args{VALUE}, map { $_->id } @{ $groups->ItemsArrayRef } );
    -+                push @ids, map { $_->id } @{ $groups->ItemsArrayRef };
    ++                my @group_ids;
    ++                for my $id (@ids) {
    ++                    my $groups = RT::Groups->new( RT->SystemUser );
    ++                    $groups->LimitToUserDefinedGroups;
    ++                    $groups->WithMember( PrincipalId => $id, Recursively => 1 );
    ++                    push @group_ids, map { $_->id } @{ $groups->ItemsArrayRef };
    ++                }
    ++                push @ids, @group_ids;
                  }
      
                  # Save a left join to Users, if possible
2: a08bc07924 = 2: 0d8c8b5306 Test ticket search by id/name of the group added in watchers



More information about the rt-commit mailing list