|
|
@ -80,18 +80,18 @@ module API |
|
|
|
|
|
|
|
|
|
|
|
def percentage_done_writable? |
|
|
|
def percentage_done_writable? |
|
|
|
if Setting.work_package_done_ratio == 'status' || |
|
|
|
if Setting.work_package_done_ratio == 'status' || |
|
|
|
Setting.work_package_done_ratio == 'disabled' |
|
|
|
Setting.work_package_done_ratio == 'disabled' |
|
|
|
return false |
|
|
|
return false |
|
|
|
end |
|
|
|
end |
|
|
|
work_package_present_and_parent? |
|
|
|
is_leaf_or_nil?(@work_package) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def estimated_time_writable? |
|
|
|
def estimated_time_writable? |
|
|
|
work_package_present_and_parent? |
|
|
|
is_leaf_or_nil?(@work_package) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def work_package_present_and_parent? |
|
|
|
def is_leaf_or_nil?(work_package) |
|
|
|
@work_package.nil? ? true : @work_package.children.count < 1 |
|
|
|
work_package.nil? ? true : work_package.children.empty? |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|