summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-06-27 07:18:58 +0000
committerGo MAEDA <maeda@farend.jp>2021-06-27 07:18:58 +0000
commite2c08c7b36e4fd270aed6691d4d8d8e216b4a4c8 (patch)
tree41a0aec147a958e9bd53c51b87e5fc94f52c8d00 /app/views
parent51755e4349fb46316aebbb192a03210ff09683f7 (diff)
downloadredmine-e2c08c7b36e4fd270aed6691d4d8d8e216b4a4c8.tar.gz
redmine-e2c08c7b36e4fd270aed6691d4d8d8e216b4a4c8.zip
Add total estimated hours, spent hours, total spent hours for issues to issue list API (#34857).
Patch by Felix Schäfer and Takenori TAKAKI. git-svn-id: http://svn.redmine.org/redmine/trunk@21051 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/issues/index.api.rsb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/views/issues/index.api.rsb b/app/views/issues/index.api.rsb
index 4bba32549..da60ea5c6 100644
--- a/app/views/issues/index.api.rsb
+++ b/app/views/issues/index.api.rsb
@@ -19,6 +19,11 @@ api.array :issues, api_meta(:total_count => @issue_count, :offset => @offset, :l
api.done_ratio issue.done_ratio
api.is_private issue.is_private
api.estimated_hours issue.estimated_hours
+ api.total_estimated_hours issue.total_estimated_hours
+ if User.current.allowed_to?(:view_time_entries, issue.project)
+ api.spent_hours(issue.spent_hours)
+ api.total_spent_hours(issue.total_spent_hours)
+ end
render_api_custom_values issue.visible_custom_field_values, api