kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
2.8 KiB
59 lines
2.8 KiB
#-- copyright
|
|
# OpenProject is a project management system.
|
|
# Copyright (C) 2012-2013 the OpenProject Foundation (OPF)
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License version 3.
|
|
#
|
|
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
|
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
|
# Copyright (C) 2010-2013 the ChiliProject Team
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# as published by the Free Software Foundation; either version 2
|
|
# of the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
#
|
|
# See doc/COPYRIGHT.rdoc for more details.
|
|
#++
|
|
|
|
api.array :issues, api_meta(:total_count => @issues.total_entries,
|
|
:offset => @issues.offset,
|
|
:limit => @issues.per_page) do
|
|
@issues.each do |issue|
|
|
api.issue do
|
|
api.id issue.id
|
|
api.project(:id => issue.project_id, :name => issue.project.name) unless issue.project.nil?
|
|
api.type(:id => issue.type_id, :name => issue.type.name) unless issue.type.nil?
|
|
api.status(:id => issue.status_id, :name => issue.status.name) unless issue.status.nil?
|
|
api.priority(:id => issue.priority_id, :name => issue.priority.name) unless issue.priority.nil?
|
|
api.author(:id => issue.author_id, :name => issue.author.name) unless issue.author.nil?
|
|
api.assigned_to(:id => issue.assigned_to_id, :name => issue.assigned_to.name) unless issue.assigned_to.nil?
|
|
api.category(:id => issue.category_id, :name => issue.category.name) unless issue.category.nil?
|
|
api.fixed_version(:id => issue.fixed_version_id, :name => issue.fixed_version.name) unless issue.fixed_version.nil?
|
|
api.parent(:id => issue.parent_id) unless issue.parent.nil?
|
|
|
|
api.subject issue.subject
|
|
api.description issue.description
|
|
api.start_date issue.start_date
|
|
api.due_date issue.due_date
|
|
call_hook(:api_issue_index_attributes, :api => api, :issue => issue)
|
|
work_package_api_done_ratio_if_enabled api, issue
|
|
api.estimated_hours issue.estimated_hours
|
|
|
|
render_api_custom_values issue.custom_field_values, api
|
|
|
|
api.created_on issue.created_at
|
|
api.updated_on issue.updated_at
|
|
end
|
|
end
|
|
end
|
|
|