Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
faa719b5
Commit
faa719b5
authored
Aug 13, 2020
by
Marcin Sedlak-Jakubowski
Committed by
Oswaldo Ferreira
Aug 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change sub-epics to child epics in errors and GraphQL schema
parent
973c6177
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
30 additions
and
30 deletions
+30
-30
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+2
-2
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+2
-2
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+2
-2
ee/app/graphql/types/epic_descendant_count_type.rb
ee/app/graphql/types/epic_descendant_count_type.rb
+2
-2
ee/app/models/ee/epic.rb
ee/app/models/ee/epic.rb
+3
-3
ee/app/models/ee/issue.rb
ee/app/models/ee/issue.rb
+1
-1
ee/app/models/epic_issue.rb
ee/app/models/epic_issue.rb
+1
-1
ee/spec/models/epic_issue_spec.rb
ee/spec/models/epic_issue_spec.rb
+3
-3
ee/spec/models/epic_spec.rb
ee/spec/models/epic_spec.rb
+2
-2
ee/spec/models/issue_spec.rb
ee/spec/models/issue_spec.rb
+2
-2
ee/spec/services/epic_issues/create_service_spec.rb
ee/spec/services/epic_issues/create_service_spec.rb
+2
-2
ee/spec/services/epic_links/create_service_spec.rb
ee/spec/services/epic_links/create_service_spec.rb
+2
-2
locale/gitlab.pot
locale/gitlab.pot
+6
-6
No files found.
doc/api/graphql/reference/gitlab_schema.graphql
View file @
faa719b5
...
@@ -4896,7 +4896,7 @@ Counts of descendent epics.
...
@@ -4896,7 +4896,7 @@ Counts of descendent epics.
"""
"""
type
EpicDescendantCount
{
type
EpicDescendantCount
{
"""
"""
Number
of
closed
sub
-
epics
Number
of
closed
child
epics
"""
"""
closedEpics
:
Int
closedEpics
:
Int
...
@@ -4906,7 +4906,7 @@ type EpicDescendantCount {
...
@@ -4906,7 +4906,7 @@ type EpicDescendantCount {
closedIssues
:
Int
closedIssues
:
Int
"""
"""
Number
of
opened
sub
-
epics
Number
of
opened
child
epics
"""
"""
openedEpics
:
Int
openedEpics
:
Int
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
faa719b5
...
@@ -13649,7 +13649,7 @@
...
@@ -13649,7 +13649,7 @@
"fields": [
"fields": [
{
{
"name": "closedEpics",
"name": "closedEpics",
"description": "Number of closed
sub-
epics",
"description": "Number of closed
child
epics",
"args": [
"args": [
],
],
...
@@ -13677,7 +13677,7 @@
...
@@ -13677,7 +13677,7 @@
},
},
{
{
"name": "openedEpics",
"name": "openedEpics",
"description": "Number of opened
sub-
epics",
"description": "Number of opened
child
epics",
"args": [
"args": [
],
],
doc/api/graphql/reference/index.md
View file @
faa719b5
...
@@ -792,9 +792,9 @@ Counts of descendent epics.
...
@@ -792,9 +792,9 @@ Counts of descendent epics.
| Name | Type | Description |
| Name | Type | Description |
| --- | ---- | ---------- |
| --- | ---- | ---------- |
|
`closedEpics`
| Int | Number of closed
sub-
epics |
|
`closedEpics`
| Int | Number of closed
child
epics |
|
`closedIssues`
| Int | Number of closed epic issues |
|
`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 |
|
`openedIssues`
| Int | Number of opened epic issues |
## EpicDescendantWeights
## EpicDescendantWeights
...
...
ee/app/graphql/types/epic_descendant_count_type.rb
View file @
faa719b5
...
@@ -6,8 +6,8 @@ module Types
...
@@ -6,8 +6,8 @@ module Types
graphql_name
'EpicDescendantCount'
graphql_name
'EpicDescendantCount'
description
'Counts of descendent epics.'
description
'Counts of descendent epics.'
field
:opened_epics
,
GraphQL
::
INT_TYPE
,
null:
true
,
description:
'Number of opened
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
sub-
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
: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'
field
:closed_issues
,
GraphQL
::
INT_TYPE
,
null:
true
,
description:
'Number of closed epic issues'
end
end
...
...
ee/app/models/ee/epic.rb
View file @
faa719b5
...
@@ -398,11 +398,11 @@ module EE
...
@@ -398,11 +398,11 @@ module EE
return
unless
confidential?
return
unless
confidential?
if
issues
.
public_only
.
any?
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
end
if
children
.
public_only
.
any?
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
end
end
...
@@ -410,7 +410,7 @@ module EE
...
@@ -410,7 +410,7 @@ module EE
return
unless
parent
return
unless
parent
if
!
confidential?
&&
parent
.
confidential?
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
end
end
end
...
...
ee/app/models/ee/issue.rb
View file @
faa719b5
...
@@ -242,7 +242,7 @@ module EE
...
@@ -242,7 +242,7 @@ module EE
return
unless
epic
return
unless
epic
if
!
confidential?
&&
epic
.
confidential?
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
end
end
end
...
...
ee/app/models/epic_issue.rb
View file @
faa719b5
...
@@ -24,7 +24,7 @@ class EpicIssue < ApplicationRecord
...
@@ -24,7 +24,7 @@ class EpicIssue < ApplicationRecord
return
unless
epic
&&
issue
return
unless
epic
&&
issue
if
epic
.
confidential?
&&
!
issue
.
confidential?
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
end
end
end
ee/spec/models/epic_issue_spec.rb
View file @
faa719b5
...
@@ -9,7 +9,7 @@ RSpec.describe EpicIssue do
...
@@ -9,7 +9,7 @@ RSpec.describe EpicIssue do
let
(
:issue
)
{
build
(
:issue
)
}
let
(
:issue
)
{
build
(
:issue
)
}
let
(
:confidential_issue
)
{
build
(
:issue
,
:confidential
)
}
let
(
:confidential_issue
)
{
build
(
:issue
,
:confidential
)
}
it
'is valid to add no
t-confidential issue to not
-confidential epic'
do
it
'is valid to add no
n-confidential issue to non
-confidential epic'
do
expect
(
build
(
:epic_issue
,
epic:
epic
,
issue:
issue
)).
to
be_valid
expect
(
build
(
:epic_issue
,
epic:
epic
,
issue:
issue
)).
to
be_valid
end
end
...
@@ -17,11 +17,11 @@ RSpec.describe EpicIssue do
...
@@ -17,11 +17,11 @@ RSpec.describe EpicIssue do
expect
(
build
(
:epic_issue
,
epic:
confidential_epic
,
issue:
confidential_issue
)).
to
be_valid
expect
(
build
(
:epic_issue
,
epic:
confidential_epic
,
issue:
confidential_issue
)).
to
be_valid
end
end
it
'is valid to add confidential issue to no
t
-confidential epic'
do
it
'is valid to add confidential issue to no
n
-confidential epic'
do
expect
(
build
(
:epic_issue
,
epic:
epic
,
issue:
confidential_issue
)).
to
be_valid
expect
(
build
(
:epic_issue
,
epic:
epic
,
issue:
confidential_issue
)).
to
be_valid
end
end
it
'is not valid to add no
t
-confidential issue to confidential epic'
do
it
'is not valid to add no
n
-confidential issue to confidential epic'
do
expect
(
build
(
:epic_issue
,
epic:
confidential_epic
,
issue:
issue
)).
not_to
be_valid
expect
(
build
(
:epic_issue
,
epic:
confidential_epic
,
issue:
issue
)).
not_to
be_valid
end
end
end
end
...
...
ee/spec/models/epic_spec.rb
View file @
faa719b5
...
@@ -72,7 +72,7 @@ RSpec.describe Epic do
...
@@ -72,7 +72,7 @@ RSpec.describe Epic do
expect
(
epic
).
to
be_valid
expect
(
epic
).
to
be_valid
end
end
it
'is not valid if epic is confidential and has no
t
-confidential issues'
do
it
'is not valid if epic is confidential and has no
n
-confidential issues'
do
epic
=
create
(
:epic_issue
).
epic
epic
=
create
(
:epic_issue
).
epic
epic
.
confidential
=
true
epic
.
confidential
=
true
...
@@ -89,7 +89,7 @@ RSpec.describe Epic do
...
@@ -89,7 +89,7 @@ RSpec.describe Epic do
expect
(
epic
).
to
be_valid
expect
(
epic
).
to
be_valid
end
end
it
'is not valid if epic is confidential and has no
t
-confidential subepics'
do
it
'is not valid if epic is confidential and has no
n
-confidential subepics'
do
epic
=
create
(
:epic
,
group:
group
)
epic
=
create
(
:epic
,
group:
group
)
create
(
:epic
,
parent:
epic
,
group:
group
)
create
(
:epic
,
parent:
epic
,
group:
group
)
...
...
ee/spec/models/issue_spec.rb
View file @
faa719b5
...
@@ -208,7 +208,7 @@ RSpec.describe Issue do
...
@@ -208,7 +208,7 @@ RSpec.describe Issue do
describe
'confidential'
do
describe
'confidential'
do
subject
{
build
(
:issue
,
:confidential
)
}
subject
{
build
(
:issue
,
:confidential
)
}
it
'is valid when changing to no
t-confidential and is associated with not
-confidential epic'
do
it
'is valid when changing to no
n-confidential and is associated with non
-confidential epic'
do
subject
.
epic
=
build
(
:epic
)
subject
.
epic
=
build
(
:epic
)
subject
.
confidential
=
false
subject
.
confidential
=
false
...
@@ -216,7 +216,7 @@ RSpec.describe Issue do
...
@@ -216,7 +216,7 @@ RSpec.describe Issue do
expect
(
subject
).
to
be_valid
expect
(
subject
).
to
be_valid
end
end
it
'is not valid when changing to no
t
-confidential and is associated with confidential epic'
do
it
'is not valid when changing to no
n
-confidential and is associated with confidential epic'
do
subject
.
epic
=
build
(
:epic
,
:confidential
)
subject
.
epic
=
build
(
:epic
,
:confidential
)
subject
.
confidential
=
false
subject
.
confidential
=
false
...
...
ee/spec/services/epic_issues/create_service_spec.rb
View file @
faa719b5
...
@@ -220,8 +220,8 @@ RSpec.describe EpicIssues::CreateService do
...
@@ -220,8 +220,8 @@ RSpec.describe EpicIssues::CreateService do
expect
(
subject
).
to
eq
(
expect
(
subject
).
to
eq
(
status: :error
,
status: :error
,
http_status:
422
,
http_status:
422
,
message:
"
#{
invalid_issue1
.
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
not
-confidential issue"
"
#{
invalid_issue2
.
to_reference
}
cannot be added: Cannot set confidential epic for
a non
-confidential issue"
)
)
end
end
end
end
...
...
ee/spec/services/epic_links/create_service_spec.rb
View file @
faa719b5
...
@@ -285,8 +285,8 @@ RSpec.describe EpicLinks::CreateService do
...
@@ -285,8 +285,8 @@ RSpec.describe EpicLinks::CreateService do
expect
(
subject
).
to
eq
(
expect
(
subject
).
to
eq
(
status: :error
,
status: :error
,
http_status:
422
,
http_status:
422
,
message:
"
#{
invalid_epic1
.
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:
Not
-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
end
end
...
...
locale/gitlab.pot
View file @
faa719b5
...
@@ -1156,6 +1156,9 @@ msgstr ""
...
@@ -1156,6 +1156,9 @@ msgstr ""
msgid "A new impersonation token has been created."
msgid "A new impersonation token has been created."
msgstr ""
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."
msgid "A plain HTML site that uses Netlify for CI/CD instead of GitLab, but still with all the other great GitLab features."
msgstr ""
msgstr ""
...
@@ -4340,10 +4343,10 @@ msgstr ""
...
@@ -4340,10 +4343,10 @@ msgstr ""
msgid "Cannot import because issues are not available in this project."
msgid "Cannot import because issues are not available in this project."
msgstr ""
msgstr ""
msgid "Cannot make
epic confidential if it contains not-confidential issue
s"
msgid "Cannot make
the epic confidential if it contains non-confidential child epic
s"
msgstr ""
msgstr ""
msgid "Cannot make
epic confidential if it contains not-confidential sub-epic
s"
msgid "Cannot make
the epic confidential if it contains non-confidential issue
s"
msgstr ""
msgstr ""
msgid "Cannot merge"
msgid "Cannot merge"
...
@@ -4364,7 +4367,7 @@ msgstr ""
...
@@ -4364,7 +4367,7 @@ msgstr ""
msgid "Cannot refer to a group %{timebox_type} by an internal id!"
msgid "Cannot refer to a group %{timebox_type} by an internal id!"
msgstr ""
msgstr ""
msgid "Cannot set confidential epic for
not
-confidential issue"
msgid "Cannot set confidential epic for
a non
-confidential issue"
msgstr ""
msgstr ""
msgid "Cannot show preview. For previews on sketch files, they must have the file format introduced by Sketch version 43 and above."
msgid "Cannot show preview. For previews on sketch files, they must have the file format introduced by Sketch version 43 and above."
...
@@ -16448,9 +16451,6 @@ msgstr ""
...
@@ -16448,9 +16451,6 @@ msgstr ""
msgid "Not started"
msgid "Not started"
msgstr ""
msgstr ""
msgid "Not-confidential epic cannot be assigned to a confidential parent epic"
msgstr ""
msgid "Note"
msgid "Note"
msgstr ""
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment