errors.add:parent,"This epic can't be added because it must belong to the same group as the parent, or subgroup of the parent epic’s group"
errors.add:parent,"This epic cannot be added. An epic must belong to the same group or subgroup as its parent epic."
elsiflevel_depth_exceeded?(parent)
elsiflevel_depth_exceeded?(parent)
errors.add:parent,"This epic can't be added as the maximum depth of nested epics would be exceeded"
errors.add:parent,"This epic cannot be added. One or more epics would exceed the maximum depth (#{MAX_HIERARCHY_DEPTH}) from its most distant ancestor."
returnerror("This epic can't be added because the parent is already at the maximum depth from its most distant ancestor",409)
returnerror("This epic cannot be added. One or more epics would exceed the maximum depth (#{Epic::MAX_HIERARCHY_DEPTH}) from its most distant ancestor.",409)
@@ -214,7 +215,7 @@ RSpec.describe 'Epic Issues', :js do
...
@@ -214,7 +215,7 @@ RSpec.describe 'Epic Issues', :js do
add_epics(references)
add_epics(references)
expect(page).tohave_selector('.gl-field-error')
expect(page).tohave_selector('.gl-field-error')
expect(find('.gl-field-error')).tohave_text("This epic can't be added because the parent is already at the maximum depth from its most distant ancestor")
expect(find('.gl-field-error')).tohave_text("This epic cannot be added. One or more epics would exceed the maximum depth (5) from its most distant ancestor.")
@@ -237,7 +237,7 @@ RSpec.describe Epics::TreeReorderService do
...
@@ -237,7 +237,7 @@ RSpec.describe Epics::TreeReorderService do
epic2.update(parent: epic1)
epic2.update(parent: epic1)
end
end
it_behaves_like'error for the tree update',"This epic can't be added because it must belong to the same group as the parent, or subgroup of the parent epic’s group"
it_behaves_like'error for the tree update',"This epic cannot be added. An epic must belong to the same group or subgroup as its parent epic."
end
end
context'when user does not have permissions to admin the new parent'do
context'when user does not have permissions to admin the new parent'do