]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1518522 - phabbugz comments in bugs need to set is_markdown to true
authordklawren <dklawren@users.noreply.github.com>
Tue, 8 Jan 2019 17:42:39 +0000 (12:42 -0500)
committerGitHub <noreply@github.com>
Tue, 8 Jan 2019 17:42:39 +0000 (12:42 -0500)
extensions/PhabBugz/lib/Util.pm

index d5521ad4f3f2803ec0ab6e745a4dc58e1c998eba..b6d5a54ce44dad3379a600e067ff90d6a97fe24a 100644 (file)
@@ -81,9 +81,14 @@ sub create_revision_attachment {
   });
 
   # Insert a comment about the new attachment into the database.
-  $bug->add_comment($revision->summary,
-    {type => CMT_ATTACHMENT_CREATED, extra_data => $attachment->id});
-
+  $bug->add_comment(
+    $revision->summary,
+    {
+      type        => CMT_ATTACHMENT_CREATED,
+      extra_data  => $attachment->id,
+      is_markdown => (Bugzilla->params->{use_markdown} ? 1 : 0)
+    }
+  );
   delete $bug->{attachments};
 
   return $attachment;
@@ -105,10 +110,8 @@ sub get_bug_role_phids {
   push(@bug_users, $bug->qa_contact)  if $bug->qa_contact;
   push(@bug_users, @{$bug->cc_users}) if @{$bug->cc_users};
 
-  my $phab_users
-    = Bugzilla::Extension::PhabBugz::User->match({
-    ids => [map { $_->id } @bug_users]
-    });
+  my $phab_users = Bugzilla::Extension::PhabBugz::User->match(
+    {ids => [map { $_->id } @bug_users]});
 
   return [map { $_->phid } @{$phab_users}];
 }
@@ -139,10 +142,8 @@ sub get_attachment_revisions {
 
   my @revisions;
   foreach my $revision_id (@revision_ids) {
-    my $revision
-      = Bugzilla::Extension::PhabBugz::Revision->new_from_query({
-      ids => [$revision_id]
-      });
+    my $revision = Bugzilla::Extension::PhabBugz::Revision->new_from_query(
+      {ids => [$revision_id]});
     push @revisions, $revision if $revision;
   }