Commit 7d542903 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Merge branch 'msj-subepics-to-child-epics' into 'master'

Change sub-epics to child epics in errors and GraphQL schema

Closes #235773

See merge request gitlab-org/gitlab!39351
parents abebbc00 faa719b5
......@@ -4971,7 +4971,7 @@ Counts of descendent epics.
"""
type EpicDescendantCount {
"""
Number of closed sub-epics
Number of closed child epics
"""
closedEpics: Int
......@@ -4981,7 +4981,7 @@ type EpicDescendantCount {
closedIssues: Int
"""
Number of opened sub-epics
Number of opened child epics
"""
openedEpics: Int
......
......@@ -13855,7 +13855,7 @@
"fields": [
{
"name": "closedEpics",
"description": "Number of closed sub-epics",
"description": "Number of closed child epics",
"args": [
],
......@@ -13883,7 +13883,7 @@
},
{
"name": "openedEpics",
"description": "Number of opened sub-epics",
"description": "Number of opened child epics",
"args": [
],
......@@ -807,9 +807,9 @@ Counts of descendent epics.
| Name | Type | Description |
| --- | ---- | ---------- |
| `closedEpics` | Int | Number of closed sub-epics |
| `closedEpics` | Int | Number of closed child epics |
| `closedIssues` | Int | Number of closed epic issues |
| `openedEpics` | Int | Number of opened sub-epics |
| `openedEpics` | Int | Number of opened child epics |
| `openedIssues` | Int | Number of opened epic issues |
## EpicDescendantWeights
......
......@@ -6,8 +6,8 @@ module Types
graphql_name 'EpicDescendantCount'
description 'Counts of descendent epics.'
field :opened_epics, GraphQL::INT_TYPE, null: true, description: 'Number of opened sub-epics'
field :closed_epics, GraphQL::INT_TYPE, null: true, description: 'Number of closed sub-epics'
field :opened_epics, GraphQL::INT_TYPE, null: true, description: 'Number of opened child epics'
field :closed_epics, GraphQL::INT_TYPE, null: true, description: 'Number of closed child epics'
field :opened_issues, GraphQL::INT_TYPE, null: true, description: 'Number of opened epic issues'
field :closed_issues, GraphQL::INT_TYPE, null: true, description: 'Number of closed epic issues'
end
......
......@@ -398,11 +398,11 @@ module EE
return unless confidential?
if issues.public_only.any?
errors.add :confidential, _('Cannot make epic confidential if it contains not-confidential issues')
errors.add :confidential, _('Cannot make the epic confidential if it contains non-confidential issues')
end
if children.public_only.any?
errors.add :confidential, _('Cannot make epic confidential if it contains not-confidential sub-epics')
errors.add :confidential, _('Cannot make the epic confidential if it contains non-confidential child epics')
end
end
......@@ -410,7 +410,7 @@ module EE
return unless parent
if !confidential? && parent.confidential?
errors.add :confidential, _('Not-confidential epic cannot be assigned to a confidential parent epic')
errors.add :confidential, _('A non-confidential epic cannot be assigned to a confidential parent epic')
end
end
end
......
......@@ -242,7 +242,7 @@ module EE
return unless epic
if !confidential? && epic.confidential?
errors.add :issue, _('Cannot set confidential epic for not-confidential issue')
errors.add :issue, _('Cannot set confidential epic for a non-confidential issue')
end
end
end
......
......@@ -24,7 +24,7 @@ class EpicIssue < ApplicationRecord
return unless epic && issue
if epic.confidential? && !issue.confidential?
errors.add :issue, _('Cannot set confidential epic for not-confidential issue')
errors.add :issue, _('Cannot set confidential epic for a non-confidential issue')
end
end
end
......@@ -9,7 +9,7 @@ RSpec.describe EpicIssue do
let(:issue) { build(:issue) }
let(:confidential_issue) { build(:issue, :confidential) }
it 'is valid to add not-confidential issue to not-confidential epic' do
it 'is valid to add non-confidential issue to non-confidential epic' do
expect(build(:epic_issue, epic: epic, issue: issue)).to be_valid
end
......@@ -17,11 +17,11 @@ RSpec.describe EpicIssue do
expect(build(:epic_issue, epic: confidential_epic, issue: confidential_issue)).to be_valid
end
it 'is valid to add confidential issue to not-confidential epic' do
it 'is valid to add confidential issue to non-confidential epic' do
expect(build(:epic_issue, epic: epic, issue: confidential_issue)).to be_valid
end
it 'is not valid to add not-confidential issue to confidential epic' do
it 'is not valid to add non-confidential issue to confidential epic' do
expect(build(:epic_issue, epic: confidential_epic, issue: issue)).not_to be_valid
end
end
......
......@@ -72,7 +72,7 @@ RSpec.describe Epic do
expect(epic).to be_valid
end
it 'is not valid if epic is confidential and has not-confidential issues' do
it 'is not valid if epic is confidential and has non-confidential issues' do
epic = create(:epic_issue).epic
epic.confidential = true
......@@ -89,7 +89,7 @@ RSpec.describe Epic do
expect(epic).to be_valid
end
it 'is not valid if epic is confidential and has not-confidential subepics' do
it 'is not valid if epic is confidential and has non-confidential subepics' do
epic = create(:epic, group: group)
create(:epic, parent: epic, group: group)
......
......@@ -208,7 +208,7 @@ RSpec.describe Issue do
describe 'confidential' do
subject { build(:issue, :confidential) }
it 'is valid when changing to not-confidential and is associated with not-confidential epic' do
it 'is valid when changing to non-confidential and is associated with non-confidential epic' do
subject.epic = build(:epic)
subject.confidential = false
......@@ -216,7 +216,7 @@ RSpec.describe Issue do
expect(subject).to be_valid
end
it 'is not valid when changing to not-confidential and is associated with confidential epic' do
it 'is not valid when changing to non-confidential and is associated with confidential epic' do
subject.epic = build(:epic, :confidential)
subject.confidential = false
......
......@@ -220,8 +220,8 @@ RSpec.describe EpicIssues::CreateService do
expect(subject).to eq(
status: :error,
http_status: 422,
message: "#{invalid_issue1.to_reference} cannot be added: Cannot set confidential epic for not-confidential issue. "\
"#{invalid_issue2.to_reference} cannot be added: Cannot set confidential epic for not-confidential issue"
message: "#{invalid_issue1.to_reference} cannot be added: Cannot set confidential epic for a non-confidential issue. "\
"#{invalid_issue2.to_reference} cannot be added: Cannot set confidential epic for a non-confidential issue"
)
end
end
......
......@@ -285,8 +285,8 @@ RSpec.describe EpicLinks::CreateService do
expect(subject).to eq(
status: :error,
http_status: 422,
message: "#{invalid_epic1.to_reference} cannot be added: Not-confidential epic cannot be assigned to a confidential parent epic. "\
"#{invalid_epic2.to_reference} cannot be added: Not-confidential epic cannot be assigned to a confidential parent epic"
message: "#{invalid_epic1.to_reference} cannot be added: A non-confidential epic cannot be assigned to a confidential parent epic. "\
"#{invalid_epic2.to_reference} cannot be added: A non-confidential epic cannot be assigned to a confidential parent epic"
)
end
end
......
......@@ -1159,6 +1159,9 @@ msgstr ""
msgid "A new impersonation token has been created."
msgstr ""
msgid "A non-confidential epic cannot be assigned to a confidential parent epic"
msgstr ""
msgid "A plain HTML site that uses Netlify for CI/CD instead of GitLab, but still with all the other great GitLab features."
msgstr ""
......@@ -4346,10 +4349,10 @@ msgstr ""
msgid "Cannot import because issues are not available in this project."
msgstr ""
msgid "Cannot make epic confidential if it contains not-confidential issues"
msgid "Cannot make the epic confidential if it contains non-confidential child epics"
msgstr ""
msgid "Cannot make epic confidential if it contains not-confidential sub-epics"
msgid "Cannot make the epic confidential if it contains non-confidential issues"
msgstr ""
msgid "Cannot merge"
......@@ -4370,7 +4373,7 @@ msgstr ""
msgid "Cannot refer to a group %{timebox_type} by an internal id!"
msgstr ""
msgid "Cannot set confidential epic for not-confidential issue"
msgid "Cannot set confidential epic for a non-confidential issue"
msgstr ""
msgid "Cannot show preview. For previews on sketch files, they must have the file format introduced by Sketch version 43 and above."
......@@ -16505,9 +16508,6 @@ msgstr ""
msgid "Not started"
msgstr ""
msgid "Not-confidential epic cannot be assigned to a confidential parent epic"
msgstr ""
msgid "Note"
msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment