Project

General

Profile

Actions

Feature #33151

open

Provide status for issue children via REST API

Added by Rasmus Eneman about 4 years ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

When the children to an issue is requested with `/issue/1.json?include=children` they are returned in the format:

{
  children: Array<{
    id: number
    tracker: {
      id: number
      name: string
    }
    subject: string
  }>,
  ...
}

It would be very nice if also the status where returned, like so:

{
  children: Array<{
    id: number
    tracker: {
      id: number
      name: string
    }
    status: {
      id: number
      name: string
    }
    subject: string
  }>,
  ...
}

When displaying an overview of a parent issue it's often very helpful to be able to show the status of all child issues.

This can be worked around by sending an extra request like `/issues.json?issue_id=2,3,4` for all child issues, but it feels wasteful and unnecessarily cumbersome for what I assume would be a quite common use case.

Actions #1

Updated by Go MAEDA about 4 years ago

  • Description updated (diff)
Actions #2

Updated by Petr Bystrov about 2 months ago

This works for me (Redmine 5.0.5):

--- app/helpers/issues_helper.rb.orig   2024-02-27 05:55:28.979332869 -0800
+++ app/helpers/issues_helper.rb        2024-02-27 06:08:12.045213589 -0800
@@ -682,6 +682,7 @@
       issue.children.each do |child|
         api.issue(:id => child.id) do
           api.tracker(:id => child.tracker_id, :name => child.tracker.name) unless child.tracker.nil?
+          api.status(:id => child.status_id, :name => child.status.name, :is_closed => child.status.is_closed) unless child.status.nil?
           api.subject child.subject
           render_api_issue_children(child, api)
         end

Actions

Also available in: Atom PDF