|
|
@ -247,11 +247,11 @@ module API |
|
|
|
end, |
|
|
|
end, |
|
|
|
writeable: false, |
|
|
|
writeable: false, |
|
|
|
if: -> (_) { current_user_allowed_to(:view_time_entries) } |
|
|
|
if: -> (_) { current_user_allowed_to(:view_time_entries) } |
|
|
|
property :percentage_done, |
|
|
|
property :done_ratio, |
|
|
|
|
|
|
|
as: :percentageDone, |
|
|
|
render_nil: true, |
|
|
|
render_nil: true, |
|
|
|
exec_context: :decorator, |
|
|
|
writeable: false, |
|
|
|
setter: -> (value, *) { self.done_ratio = value }, |
|
|
|
if: -> (*) { Setting.work_package_done_ratio != 'disabled' } |
|
|
|
writeable: false |
|
|
|
|
|
|
|
property :parent_id, writeable: true |
|
|
|
property :parent_id, writeable: true |
|
|
|
property :created_at, |
|
|
|
property :created_at, |
|
|
|
exec_context: :decorator, |
|
|
|
exec_context: :decorator, |
|
|
@ -353,10 +353,6 @@ module API |
|
|
|
@visible_children ||= represented.children.select(&:visible?) |
|
|
|
@visible_children ||= represented.children.select(&:visible?) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def percentage_done |
|
|
|
|
|
|
|
represented.done_ratio unless Setting.work_package_done_ratio == 'disabled' |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private |
|
|
|
private |
|
|
|
|
|
|
|
|
|
|
|
def version_policy |
|
|
|
def version_policy |
|
|
|