[Rt-commit] r19900 - rt/3.8/trunk/share/html/Admin/Queues

elacour at bestpractical.com elacour at bestpractical.com
Thu Jun 4 10:17:39 EDT 2009


Author: elacour
Date: Thu Jun  4 10:17:39 2009
New Revision: 19900

Modified:
   rt/3.8/trunk/share/html/Admin/Queues/People.html

Log:
Don't update watcher in queue watcher edit page when we search for people and
one or more current watchers are selected (closes: #13425).

Modified: rt/3.8/trunk/share/html/Admin/Queues/People.html
==============================================================================
--- rt/3.8/trunk/share/html/Admin/Queues/People.html	(original)
+++ rt/3.8/trunk/share/html/Admin/Queues/People.html	Thu Jun  4 10:17:39 2009
@@ -146,33 +146,34 @@
 $QueueObj->Load($id) || Abort(loc("Couldn't load queue", $id));
 # }}}
 
+unless ($OnlySearchForPeople or $OnlySearchForGroup) {
 # {{{ Delete deletable watchers
 
-foreach my $key (keys %ARGS) {
-        my $id = $QueueObj->Id;
+    foreach my $key (keys %ARGS) {
+            my $id = $QueueObj->Id;
 
-    if (($key =~ /^Queue-$id-DeleteWatcher-Type-(.*?)-Principal-(\d*)$/)) {;
-	    my ($code, $msg) = $QueueObj->DeleteWatcher(Type => $1,
-                                                    PrincipalId => $2);
-	    push @results, $msg;
+        if (($key =~ /^Queue-$id-DeleteWatcher-Type-(.*?)-Principal-(\d*)$/)) {;
+            my ($code, $msg) = $QueueObj->DeleteWatcher(Type => $1,
+                                                        PrincipalId => $2);
+            push @results, $msg;
+        }
     }
-}
 # }}}
 
 # {{{ Add new watchers
-foreach my  $key (keys %ARGS) {
-    #They're in this order because otherwise $1 gets clobbered :/
-    if ( ($ARGS{$key} =~ /^(AdminCc|Cc)$/) and
-	 ($key =~ /^Queue-AddWatcher-Principal-(\d*)$/) ) {
-	$RT::Logger->debug("Adding a watcher $1 to ".$ARGS{$key}."\n");
-	my ($code, $msg) = $QueueObj->AddWatcher(Type => $ARGS{$key},
-				                             PrincipalId => $1);
-	push @results, $msg;
+    foreach my  $key (keys %ARGS) {
+        #They're in this order because otherwise $1 gets clobbered :/
+        if ( ($ARGS{$key} =~ /^(AdminCc|Cc)$/) and
+         ($key =~ /^Queue-AddWatcher-Principal-(\d*)$/) ) {
+        $RT::Logger->debug("Adding a watcher $1 to ".$ARGS{$key}."\n");
+        my ($code, $msg) = $QueueObj->AddWatcher(Type => $ARGS{$key},
+                                                 PrincipalId => $1);
+        push @results, $msg;
+        }
     }
-}
 
 # }}}
-
+}
  
 
 if (!length $ARGS{'UserString'}) {
@@ -200,6 +201,8 @@
 </%INIT>
 
 <%ARGS>
+$OnlySearchForPeople => undef
+$OnlySearchForGroup => undef
 $UserField => 'Name'
 $UserOp => '='
 $UserString => undef


More information about the Rt-commit mailing list