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
2cc20cd4
Commit
2cc20cd4
authored
Nov 09, 2020
by
Donald Cook
Committed by
Olena Horal-Koretska
Nov 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated iterations on sidebar to only show opened state
parent
005e9e5d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
3 deletions
+15
-3
ee/app/assets/javascripts/sidebar/components/iteration_select.vue
...ssets/javascripts/sidebar/components/iteration_select.vue
+2
-1
ee/app/assets/javascripts/sidebar/constants.js
ee/app/assets/javascripts/sidebar/constants.js
+2
-0
ee/app/assets/javascripts/sidebar/queries/group_iterations.query.graphql
...avascripts/sidebar/queries/group_iterations.query.graphql
+2
-2
ee/spec/features/issues/issue_sidebar_spec.rb
ee/spec/features/issues/issue_sidebar_spec.rb
+9
-0
No files found.
ee/app/assets/javascripts/sidebar/components/iteration_select.vue
View file @
2cc20cd4
...
@@ -12,7 +12,7 @@ import {
...
@@ -12,7 +12,7 @@ import {
import
groupIterationsQuery
from
'
../queries/group_iterations.query.graphql
'
;
import
groupIterationsQuery
from
'
../queries/group_iterations.query.graphql
'
;
import
currentIterationQuery
from
'
../queries/issue_iteration.query.graphql
'
;
import
currentIterationQuery
from
'
../queries/issue_iteration.query.graphql
'
;
import
setIssueIterationMutation
from
'
../queries/set_iteration_on_issue.mutation.graphql
'
;
import
setIssueIterationMutation
from
'
../queries/set_iteration_on_issue.mutation.graphql
'
;
import
{
iterationSelectTextMap
}
from
'
../constants
'
;
import
{
iterationSelectTextMap
,
iterationDisplayState
}
from
'
../constants
'
;
import
{
deprecatedCreateFlash
as
createFlash
}
from
'
~/flash
'
;
import
{
deprecatedCreateFlash
as
createFlash
}
from
'
~/flash
'
;
export
default
{
export
default
{
...
@@ -71,6 +71,7 @@ export default {
...
@@ -71,6 +71,7 @@ export default {
return
{
return
{
fullPath
:
this
.
groupPath
,
fullPath
:
this
.
groupPath
,
title
:
search
,
title
:
search
,
state
:
iterationDisplayState
,
};
};
},
},
update
(
data
)
{
update
(
data
)
{
...
...
ee/app/assets/javascripts/sidebar/constants.js
View file @
2cc20cd4
...
@@ -19,6 +19,8 @@ export const iterationSelectTextMap = {
...
@@ -19,6 +19,8 @@ export const iterationSelectTextMap = {
iterationSelectFail
:
__
(
'
Failed to set iteration on this issue. Please try again.
'
),
iterationSelectFail
:
__
(
'
Failed to set iteration on this issue. Please try again.
'
),
};
};
export
const
iterationDisplayState
=
'
opened
'
;
export
const
healthStatusForRestApi
=
{
export
const
healthStatusForRestApi
=
{
NO_STATUS
:
'
0
'
,
NO_STATUS
:
'
0
'
,
[
healthStatus
.
ON_TRACK
]:
'
on_track
'
,
[
healthStatus
.
ON_TRACK
]:
'
on_track
'
,
...
...
ee/app/assets/javascripts/sidebar/queries/group_iterations.query.graphql
View file @
2cc20cd4
query
groupIterations
(
$fullPath
:
ID
!,
$title
:
String
)
{
query
groupIterations
(
$fullPath
:
ID
!,
$title
:
String
,
$state
:
IterationState
)
{
group
(
fullPath
:
$fullPath
)
{
group
(
fullPath
:
$fullPath
)
{
iterations
(
title
:
$title
)
{
iterations
(
title
:
$title
,
state
:
$state
)
{
nodes
{
nodes
{
id
id
title
title
...
...
ee/spec/features/issues/issue_sidebar_spec.rb
View file @
2cc20cd4
...
@@ -132,6 +132,7 @@ RSpec.describe 'Issue Sidebar' do
...
@@ -132,6 +132,7 @@ RSpec.describe 'Issue Sidebar' do
context
'Iterations'
,
:js
do
context
'Iterations'
,
:js
do
context
'when iterations feature available'
do
context
'when iterations feature available'
do
let_it_be
(
:iteration
)
{
create
(
:iteration
,
group:
group
,
start_date:
1
.
day
.
from_now
,
due_date:
2
.
days
.
from_now
,
title:
'Iteration 1'
)
}
let_it_be
(
:iteration
)
{
create
(
:iteration
,
group:
group
,
start_date:
1
.
day
.
from_now
,
due_date:
2
.
days
.
from_now
,
title:
'Iteration 1'
)
}
let_it_be
(
:iteration2
)
{
create
(
:iteration
,
group:
group
,
start_date:
2
.
days
.
ago
,
due_date:
1
.
day
.
ago
,
title:
'Iteration 2'
,
state:
'closed'
,
skip_future_date_validation:
true
)
}
before
do
before
do
iteration
iteration
...
@@ -157,6 +158,14 @@ RSpec.describe 'Issue Sidebar' do
...
@@ -157,6 +158,14 @@ RSpec.describe 'Issue Sidebar' do
expect
(
page
.
find
(
'[data-testid="select-iteration"]'
)).
to
have_content
(
'No iteration'
)
expect
(
page
.
find
(
'[data-testid="select-iteration"]'
)).
to
have_content
(
'No iteration'
)
end
end
it
'does not show closed iterations'
do
find_and_click_edit_iteration
page
.
within
'.milestone'
do
expect
(
page
).
not_to
have_content
iteration2
.
title
end
end
end
end
context
'when a project does not have a group'
do
context
'when a project does not have a group'
do
...
...
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