From: dklawren Date: Wed, 5 Jun 2019 20:38:24 +0000 (-0400) Subject: Bug 1555409 - D32774 not moved out of Draft state X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4d6e16f21d0cd9fa3321fa4046e1dff61ff6ce31;p=thirdparty%2Fbugzilla.git Bug 1555409 - D32774 not moved out of Draft state --- diff --git a/extensions/PhabBugz/lib/Feed.pm b/extensions/PhabBugz/lib/Feed.pm index cbca9ae28..c99c01bc4 100644 --- a/extensions/PhabBugz/lib/Feed.pm +++ b/extensions/PhabBugz/lib/Feed.pm @@ -508,8 +508,12 @@ sub process_revision_change { $attachment->update($timestamp); } - # Set status to request-review if revision is new and in draft state - if ($is_new && $revision->status eq 'draft') { + # Set status to request-review if revision is new and + # in draft state and not changes-planned + if ($is_new + && $revision->status ne 'changes-planned' + && ($revision->is_draft && !$revision->hold_as_draft)) + { INFO("Moving from draft to needs-review"); $revision->set_status('request-review'); } diff --git a/extensions/PhabBugz/lib/Revision.pm b/extensions/PhabBugz/lib/Revision.pm index 4c6338b5c..3ec844aff 100644 --- a/extensions/PhabBugz/lib/Revision.pm +++ b/extensions/PhabBugz/lib/Revision.pm @@ -33,6 +33,8 @@ has phid => (is => 'ro', isa => Str); has title => (is => 'ro', isa => Str); has summary => (is => 'ro', isa => Str); has status => (is => 'ro', isa => Str); +has is_draft => (is => 'ro', isa => Bool | JSONBool); +has hold_as_draft => (is => 'ro', isa => Bool | JSONBool); has creation_ts => (is => 'ro', isa => Str); has modification_ts => (is => 'ro', isa => Str); has author_phid => (is => 'ro', isa => Str); @@ -105,6 +107,8 @@ sub BUILDARGS { $params->{title} = $params->{fields}->{title}; $params->{summary} = $params->{fields}->{summary}; $params->{status} = $params->{fields}->{status}->{value}; + $params->{is_draft} = $params->{fields}->{isDraft}; + $params->{hold_as_draft} = $params->{fields}->{holdAsDraft}; $params->{creation_ts} = $params->{fields}->{dateCreated}; $params->{modification_ts} = $params->{fields}->{dateModified}; $params->{author_phid} = $params->{fields}->{authorPHID};