]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1263502 - Add duplicates to /rest/bug/id
authorKohei Yoshino <kohei.yoshino@gmail.com>
Tue, 2 Oct 2018 18:24:06 +0000 (14:24 -0400)
committerdklawren <dklawren@users.noreply.github.com>
Tue, 2 Oct 2018 18:24:06 +0000 (14:24 -0400)
Bugzilla/WebService/Bug.pm
docs/en/rst/api/core/v1/bug.rst

index d247b8ffbb2e9aa81ff07a4bce8060f5e1b02da8..9003f3480714df6a94c1dbe8c57b3b8fc551e5a2 100644 (file)
@@ -1412,6 +1412,9 @@ sub _bug_to_hash {
     if (filter_wants $params, 'dupe_of') {
         $item{'dupe_of'} = $self->type('int', $bug->dup_id);
     }
+    if (filter_wants $params, 'duplicates') {
+        $item{'duplicates'} = [ map { $self->type('int', $_->id) } @{ $bug->duplicates } ];
+    }
     if (filter_wants $params, 'groups') {
         my @groups = map { $self->type('string', $_->name) }
                      @{ $bug->groups_in };
@@ -2594,6 +2597,10 @@ C<array> of C<int>s. The ids of bugs that this bug "depends on".
 C<int> The bug ID of the bug that this bug is a duplicate of. If this bug
 isn't a duplicate of any bug, this will be null.
 
+=item C<duplicates>
+
+C<array> of C<int>s. The ids of bugs that are marked as duplicate of this bug.
+
 =item C<estimated_time>
 
 C<double> The number of hours that it was estimated that this bug would
@@ -2911,6 +2918,8 @@ and all custom fields.
 =item The C<actual_time> item was added to the C<bugs> return value
 in Bugzilla B<4.4>.
 
+=item The C<duplicates> array was added in Bugzilla B<6.0>.
+
 =back
 
 =back
index c6b7be084737f124ec036f2829377bd0d2746d99..bab2cd0e81e2c6498f37e74bc709c660f31471aa 100644 (file)
@@ -102,6 +102,7 @@ name              type   description
          "is_creator_accessible": true,
          "whiteboard": "",
          "dupe_of": null,
+         "duplicates": [],
          "target_milestone": "---",
          "cf_mulitple_select": [],
          "component": "SaltSprinkler",
@@ -163,6 +164,8 @@ depends_on             array     The IDs of bugs that this bug "depends on".
 dupe_of                int       The bug ID of the bug that this bug is a
                                  duplicate of. If this bug isn't a duplicate of
                                  any bug, this will be null.
+duplicates             array     The ids of bugs that are marked as duplicate of
+                                 this bug.
 estimated_time         double    The number of hours that it was estimated that
                                  this bug would take. If you are not in the
                                  time-tracking group, this field will not be