diff options
author | dklawren <dklawren@users.noreply.github.com> | 2018-06-28 19:30:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-28 19:30:34 +0200 |
commit | f63319ac7da3fc3f9107c21ad715b8af9566fde4 (patch) | |
tree | d9caee13f60d320160921ac84b8cdd677e6663cf /extensions | |
parent | 92404e600ecfb71af823470b83b594ce3ba88eac (diff) | |
download | bugzilla-f63319ac7da3fc3f9107c21ad715b8af9566fde4.tar.gz bugzilla-f63319ac7da3fc3f9107c21ad715b8af9566fde4.tar.xz |
Bug 1469378 - Update feed daemon to only manage subscribers on a revision if the bug is private, otherwise leave it alone
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/PhabBugz/lib/Feed.pm | 10 | ||||
-rw-r--r-- | extensions/Push/lib/Connector/Phabricator.pm | 16 |
2 files changed, 14 insertions, 12 deletions
diff --git a/extensions/PhabBugz/lib/Feed.pm b/extensions/PhabBugz/lib/Feed.pm index 9fb1dac11..72829f179 100644 --- a/extensions/PhabBugz/lib/Feed.pm +++ b/extensions/PhabBugz/lib/Feed.pm @@ -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()"); diff --git a/extensions/Push/lib/Connector/Phabricator.pm b/extensions/Push/lib/Connector/Phabricator.pm index 5d5e4e639..e59ba6c0d 100644 --- a/extensions/Push/lib/Connector/Phabricator.pm +++ b/extensions/Push/lib/Connector/Phabricator.pm @@ -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(); } |