Quieten the hound

pull/2990/head
Alexander Bach 10 years ago
parent bec3e0723c
commit 83a54efc33
  1. 2
      lib/api/v3/projects/available_work_packages_api.rb
  2. 2
      lib/api/v3/projects/project_representer.rb
  3. 5
      lib/api/v3/work_packages/schema/work_package_schema_representer.rb
  4. 11
      lib/api/v3/work_packages/work_package_representer.rb
  5. 1
      lib/api/v3/work_packages/work_packages_shared_helpers.rb

@ -61,7 +61,7 @@ module API
@work_package.reload
WorkPackages::WorkPackageRepresenter.create(@work_package,
current_user: current_user)
current_user: current_user)
else
errors = ::API::Errors::ErrorBase.create(@work_package.errors.dup)
@work_package.destroy

@ -37,7 +37,7 @@ module API
self_link
link :createWorkPackage do
link :createWorkPackage do
{
href: api_v3_paths.create_work_package_form(represented.id),
method: :post

@ -94,8 +94,9 @@ module API
schema :spent_time,
type: 'Duration',
writable: false,
show_if: -> (_) { current_user_allowed_to(:view_time_entries,
context: represented.project) }
show_if: -> (_) {
current_user_allowed_to(:view_time_entries, context: represented.project)
}
schema :percentage_done,
type: 'Integer',

@ -254,8 +254,9 @@ module API
datetime_formatter.format_duration_from_hours(represented.spent_hours)
end,
writeable: false,
if: -> (_) { current_user_allowed_to(:view_time_entries,
context: represented.project) }
if: -> (_) {
current_user_allowed_to(:view_time_entries, context: represented.project)
}
property :done_ratio,
as: :percentageDone,
render_nil: true,
@ -278,8 +279,10 @@ module API
property :watchers,
embedded: true,
exec_context: :decorator,
if: -> (*) { current_user_allowed_to(:view_work_package_watchers,
context: represented.project) }
if: -> (*) {
current_user_allowed_to(:view_work_package_watchers,
context: represented.project)
}
property :attachments,
embedded: true,

@ -81,7 +81,6 @@ module API
false
end
end
end
end
end

Loading…
Cancel
Save