Feature #14717

API value for spent_hours does not include the sum of the spent_hours of the subtasks

Added by David Spackman about 4 years ago. Updated over 1 year ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:REST API
Target version:-
Resolution:Duplicate

Description

When querying an issue with the REST API (http://www.redmine.org/projects/redmine/wiki/Rest_Issues#Showing-an-issue) the value returned for spent_hours does not include the sum of the spent_hours of the subtasks.

This behaviour is different to estimated_time (which does show the sum of the estimates of the subtasks)

It would also be good to return spent hours when listing all Redmine issues (http://www.redmine.org/projects/redmine/wiki/Rest_Issues#Listing-issues)

Spent_hours_API_Patch.diff Magnifier (1.09 KB) David Spackman, 2013-08-20 02:57


Related issues

Duplicates Redmine - Feature #21757: Add Total spent hours and Estimated hours to the REST API... Closed

History

#1 Updated by David Spackman about 4 years ago

For my use I did the follow quick fix

Added a new value to the API for (GET /issues/[id].[format]) to return
  • total_spent_hours : Total hours spent on including sum of the spent_hours of the subtasks
Also added a new value to the API for (GET /issues.[format]) to return
  • spent_hours : Hours spent on the parent task
  • total_spent_hours : Total hours spent on including sum of the spent_hours of the subtasks

#2 Updated by Go MAEDA over 1 year ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Implemented by #21757, will be available as of Redmine 3.3.0.

#3 Updated by Go MAEDA over 1 year ago

  • Duplicates Feature #21757: Add Total spent hours and Estimated hours to the REST API response added

Also available in: Atom PDF