Skip to content

Commit 719858a

Browse files
cgsheehdklawren
authored andcommitted
Bug 1985621: trigger uplift changes when hash of last form changes
1 parent 5b3bad6 commit 719858a

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

extensions/PhabBugz/lib/Feed.pm

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -595,17 +595,6 @@ sub process_revision_change {
595595
my $restore_prev_user = set_phab_user();
596596
my $bug = $revision->bug;
597597

598-
my ($timestamp) = Bugzilla->dbh->selectrow_array("SELECT NOW()");
599-
600-
# Process uplift request form changes if the hash has changed since phab-bot last
601-
# saw it.
602-
if (has_uplift_request_form_changed($revision)) {
603-
process_uplift_request_form_change($revision, $bug);
604-
605-
# Return early if updating from a story change.
606-
return if is_uplift_request_form_story_change($story_text);
607-
}
608-
609598
# Check to make sure bug id is valid and author can see it
610599
if ($bug->{error}
611600
|| !$revision->author->bugzilla_user->can_see_bug($revision->bug_id))
@@ -626,6 +615,20 @@ sub process_revision_change {
626615
return;
627616
}
628617

618+
my ($timestamp) = Bugzilla->dbh->selectrow_array("SELECT NOW()");
619+
620+
# Process uplift request form changes if the hash has changed since phab-bot last
621+
# saw it.
622+
if (has_uplift_request_form_changed($revision)) {
623+
process_uplift_request_form_change($revision, $bug);
624+
625+
# Return early if updating from a story change.
626+
if (is_uplift_request_form_story_change($story_text)) {
627+
$bug->update($timestamp);
628+
return;
629+
}
630+
}
631+
629632
# REVISION SECURITY POLICY
630633

631634
# If bug is public then remove privacy policy

0 commit comments

Comments
 (0)