]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1469378 - Update feed daemon to only manage subscribers on a revision if the...
authordklawren <dklawren@users.noreply.github.com>
Thu, 28 Jun 2018 17:30:34 +0000 (13:30 -0400)
committerGitHub <noreply@github.com>
Thu, 28 Jun 2018 17:30:34 +0000 (13:30 -0400)
extensions/PhabBugz/lib/Feed.pm
extensions/Push/lib/Connector/Phabricator.pm

index 9fb1dac11f8569e2aad26b6e0b9ff0cc148a39e3..72829f179ce75c628aadf7df2a6fcef653a03ead 100644 (file)
@@ -412,12 +412,12 @@ sub process_revision_change {
                 INFO("Creating new custom policy: " . join(", ", @$set_project_names));
                 $revision->make_private($set_project_names);
             }
-        }
 
-        # Subscriber list of the private revision should always match
-        # the bug roles such as assignee, qa contact, and cc members.
-        my $subscribers = get_bug_role_phids($bug);
-        $revision->set_subscribers($subscribers);
+            # Subscriber list of the private revision should always match
+            # the bug roles such as assignee, qa contact, and cc members.
+            my $subscribers = get_bug_role_phids($bug);
+            $revision->set_subscribers($subscribers);
+        }
     }
 
     my ($timestamp) = Bugzilla->dbh->selectrow_array("SELECT NOW()");
index 5d5e4e63966132ac32eb0ebdb62391cf0489f0b7..e59ba6c0d1791e18a5dd221dfdf9fa08aa2d8b48 100644 (file)
@@ -108,13 +108,15 @@ sub send {
 
         # Subscriber list of the private revision should always match
         # the bug roles such as assignee, qa contact, and cc members.
-        Bugzilla->audit(sprintf(
-          'Updating subscribers for %s for bug %s',
-          $revision->id,
-          $bug->id
-        ));
-        my $subscribers = get_bug_role_phids($bug);
-        $revision->set_subscribers($subscribers) if $subscribers;
+        if (!$is_public) {
+            Bugzilla->audit(sprintf(
+              'Updating subscribers for %s for bug %s',
+              $revision->id,
+              $bug->id
+            ));
+            my $subscribers = get_bug_role_phids($bug);
+            $revision->set_subscribers($subscribers) if $subscribers;
+        }
 
         $revision->update();
     }