Feature #21757

Add Total spent hours and Estimated hours to the REST API response

Added by Takashi Ichihashi almost 3 years ago. Updated over 2 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:REST API
Target version:3.3.0
Resolution:Fixed

Description

Due to #20688, the sum of "estimated hours" or "spent hours" became able to be displayed on issue list and details. However, these value are not supported on REST API. I need to get them named "total_spent_hours" and "total_estimated_hours" via REST API.

feature-21757.diff Magnifier - patch (without tests) (731 Bytes) Go MAEDA, 2016-01-19 06:32

feature-21757_trunk_r15148.patch Magnifier (4.48 KB) Takenori TAKAKI, 2016-03-01 07:20


Related issues

Duplicated by Redmine - Feature #14717: API value for spent_hours does not include the sum of the... Closed
Duplicated by Redmine - Defect #22831: Rest api no longer return estimated time ,hours spent for... Closed

Associated revisions

Revision 15254
Added by Jean-Philippe Lang over 2 years ago

Total spent hours and estimated hours need to be get via REST (#21757).

Patch by Takenori TAKAKI.

History

#1 Updated by Takashi Ichihashi almost 3 years ago

I would be glad if rejected child issues could be excluded from sum of estimated hours.

#2 Updated by Go MAEDA almost 3 years ago

Please try this patch: feature-21757.diff
Tests have not yet been written.

I would be glad if rejected child issues could be excluded from sum of estimated hours.

I think API should return same values as displayed on web UI. If you want the feature on Web UI, you would be better to create another issue on this site.

#3 Updated by Go MAEDA almost 3 years ago

  • Target version set to Candidate for next major release

#4 Updated by Takenori TAKAKI almost 3 years ago

I do appreciate Takashi Ichihashi's work. I would be very happy if I could see the feature in Redmine 3.3.0.

I have updated the patch:

  • Compatible with latest trunk (r15148)
  • Added tests

#6 Updated by Go MAEDA almost 3 years ago

  • Target version changed from Candidate for next major release to 3.3.0

Works fine for me and passed all tests. Setting target version to 3.3.0.
@Takenori, thanks for adding tests to my patch.

#7 Updated by Jean-Philippe Lang over 2 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Patch committed in r15254, thanks.

#8 Updated by Go MAEDA over 2 years ago

  • Duplicated by Feature #14717: API value for spent_hours does not include the sum of the spent_hours of the subtasks added

#9 Updated by Jean-Philippe Lang over 2 years ago

  • Subject changed from Total spent hours and estimated hours need to be get via REST to Add Total spent hours and Estimated hours to the REST API response

#10 Updated by Go MAEDA almost 2 years ago

  • Duplicated by Defect #22831: Rest api no longer return estimated time ,hours spent for master tickets added

Also available in: Atom PDF