]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1587849 - Cannot create markdown comments via the REST API
authordklawren <dklawren@users.noreply.github.com>
Mon, 14 Oct 2019 14:26:54 +0000 (10:26 -0400)
committerGitHub <noreply@github.com>
Mon, 14 Oct 2019 14:26:54 +0000 (10:26 -0400)
Bugzilla/WebService/Bug.pm
docs/en/rst/api/core/v1/comment.rst

index d0b4052448c819001855e6aef72f1aa3a036474e..39e9b932c290247f738e9c5e350390d754c4c5c6 100644 (file)
@@ -1191,8 +1191,15 @@ sub add_comment {
   }
 
   # Append comment
-  $bug->add_comment($comment,
-    {isprivate => $params->{is_private}, work_time => $params->{work_time}});
+  $bug->add_comment(
+    $comment,
+    {
+      isprivate => $params->{is_private},
+      work_time => $params->{work_time},
+      is_markdown =>
+        ( defined $params->{is_markdown} ? $params->{is_markdown} : 0 )
+    }
+  );
 
   # Add comment tags
   $bug->set_all({comment_tags => $params->{comment_tags}})
index ee66170d8143d8cafdf1a9a091faff8178ad6a1e..b453f40ba428b4effd57e34e873338fdf5513e07 100644 (file)
@@ -144,7 +144,8 @@ To create a comment on a current bug.
    {
      "ids" : [123,..],
      "comment" : "This is an additional comment",
-     "is_private" : false
+     "is_private" : false,
+     "is_markdown" : true
    }
 
 ``ids`` is optional in the data example above and can be used to specify adding
@@ -160,6 +161,8 @@ ids          array    List of integer bug IDs to add the comment to.
                       did not set the ``comment`` parameter.
 is_private   boolean  If set to true, the comment is private, otherwise it is
                       assumed to be public.
+is_markdown  boolean  If true, the comment will be rendered as markdown.
+                      (default: false)
 work_time    double   Adds this many hours to the "Hours Worked" on the bug.
                       If you are not in the time tracking group, this value will
                       be ignored.