Adds option to include issue custom fields in projects#show API response (#33301).

Patch by Jens Krämer.


git-svn-id: http://svn.redmine.org/redmine/trunk@19714 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2020-04-21 08:55:33 +00:00
parent 55b9024569
commit adb899e1b9
2 changed files with 14 additions and 0 deletions

View File

@@ -152,6 +152,12 @@ module ProjectsHelper
api.enabled_module(:id => enabled_module.id, :name => enabled_module.name)
end
end if include_in_api_response?('enabled_modules')
api.array :issue_custom_fields do
project.issue_custom_fields.each do |custom_field|
api.custom_field(:id => custom_field.id, :name => custom_field.name)
end
end if include_in_api_response?('issue_custom_fields')
end
def bookmark_link(project, user = User.current)