Fix #28639. Use api_v3_path helpers for linking work package's available relation candidates

pull/6745/head
Wieland Lindenthal 6 years ago
parent 26f984c64e
commit 600e949880
  1. 4
      lib/api/v3/utilities/path_helper.rb
  2. 2
      lib/api/v3/work_packages/work_package_representer.rb

@ -406,6 +406,10 @@ module API
"#{work_package_relations(work_package_id)}/#{id}"
end
def self.work_package_available_relation_candidates(id)
"#{work_package(id)}/available_relation_candidates"
end
def self.work_package_revisions(id)
"#{work_package(id)}/revisions"
end

@ -138,7 +138,7 @@ module API
next if represented.new_record?
{
href: "/api/v3/work_packages/#{represented.id}/available_relation_candidates",
href: api_v3_paths.work_package_available_relation_candidates(represented.id),
title: "Potential work packages to relate to"
}
end

Loading…
Cancel
Save