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
f69689ca
Commit
f69689ca
authored
Aug 31, 2021
by
sstern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mv fetch iterations from ee vuex to ce for issue board filtered search
parent
6f2ab170
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
68 additions
and
65 deletions
+68
-65
app/assets/javascripts/boards/graphql/group_board_iterations.query.graphql
...ripts/boards/graphql/group_board_iterations.query.graphql
+0
-0
app/assets/javascripts/boards/graphql/project_board_iterations.query.graphql
...pts/boards/graphql/project_board_iterations.query.graphql
+0
-0
app/assets/javascripts/boards/stores/actions.js
app/assets/javascripts/boards/stores/actions.js
+48
-0
app/assets/javascripts/boards/stores/mutation_types.js
app/assets/javascripts/boards/stores/mutation_types.js
+4
-0
app/assets/javascripts/boards/stores/mutations.js
app/assets/javascripts/boards/stores/mutations.js
+14
-0
app/assets/javascripts/boards/stores/state.js
app/assets/javascripts/boards/stores/state.js
+2
-0
ee/app/assets/javascripts/boards/stores/actions.js
ee/app/assets/javascripts/boards/stores/actions.js
+0
-46
ee/app/assets/javascripts/boards/stores/mutation_types.js
ee/app/assets/javascripts/boards/stores/mutation_types.js
+0
-3
ee/app/assets/javascripts/boards/stores/mutations.js
ee/app/assets/javascripts/boards/stores/mutations.js
+0
-14
ee/app/assets/javascripts/boards/stores/state.js
ee/app/assets/javascripts/boards/stores/state.js
+0
-2
No files found.
ee/
app/assets/javascripts/boards/graphql/group_board_iterations.query.graphql
→
app/assets/javascripts/boards/graphql/group_board_iterations.query.graphql
View file @
f69689ca
File moved
ee/
app/assets/javascripts/boards/graphql/project_board_iterations.query.graphql
→
app/assets/javascripts/boards/graphql/project_board_iterations.query.graphql
View file @
f69689ca
File moved
app/assets/javascripts/boards/stores/actions.js
View file @
f69689ca
...
@@ -36,11 +36,13 @@ import {
...
@@ -36,11 +36,13 @@ import {
filterVariables
,
filterVariables
,
}
from
'
../boards_util
'
;
}
from
'
../boards_util
'
;
import
boardLabelsQuery
from
'
../graphql/board_labels.query.graphql
'
;
import
boardLabelsQuery
from
'
../graphql/board_labels.query.graphql
'
;
import
groupBoardIterationsQuery
from
'
../graphql/group_board_iterations.query.graphql
'
;
import
groupBoardMilestonesQuery
from
'
../graphql/group_board_milestones.query.graphql
'
;
import
groupBoardMilestonesQuery
from
'
../graphql/group_board_milestones.query.graphql
'
;
import
groupProjectsQuery
from
'
../graphql/group_projects.query.graphql
'
;
import
groupProjectsQuery
from
'
../graphql/group_projects.query.graphql
'
;
import
issueCreateMutation
from
'
../graphql/issue_create.mutation.graphql
'
;
import
issueCreateMutation
from
'
../graphql/issue_create.mutation.graphql
'
;
import
issueSetLabelsMutation
from
'
../graphql/issue_set_labels.mutation.graphql
'
;
import
issueSetLabelsMutation
from
'
../graphql/issue_set_labels.mutation.graphql
'
;
import
listsIssuesQuery
from
'
../graphql/lists_issues.query.graphql
'
;
import
listsIssuesQuery
from
'
../graphql/lists_issues.query.graphql
'
;
import
projectBoardIterationsQuery
from
'
../graphql/project_board_iterations.query.graphql
'
;
import
projectBoardMilestonesQuery
from
'
../graphql/project_board_milestones.query.graphql
'
;
import
projectBoardMilestonesQuery
from
'
../graphql/project_board_milestones.query.graphql
'
;
import
*
as
types
from
'
./mutation_types
'
;
import
*
as
types
from
'
./mutation_types
'
;
...
@@ -218,6 +220,52 @@ export default {
...
@@ -218,6 +220,52 @@ export default {
});
});
},
},
fetchIterations
({
state
,
commit
},
title
)
{
commit
(
types
.
RECEIVE_ITERATIONS_REQUEST
);
const
{
fullPath
,
boardType
}
=
state
;
const
variables
=
{
fullPath
,
title
,
};
let
query
;
if
(
boardType
===
BoardType
.
project
)
{
query
=
projectBoardIterationsQuery
;
}
if
(
boardType
===
BoardType
.
group
)
{
query
=
groupBoardIterationsQuery
;
}
if
(
!
query
)
{
// eslint-disable-next-line @gitlab/require-i18n-strings
throw
new
Error
(
'
Unknown board type
'
);
}
return
gqlClient
.
query
({
query
,
variables
,
})
.
then
(({
data
})
=>
{
const
errors
=
data
[
boardType
]?.
errors
;
const
iterations
=
data
[
boardType
]?.
iterations
.
nodes
;
if
(
errors
?.[
0
])
{
throw
new
Error
(
errors
[
0
]);
}
commit
(
types
.
RECEIVE_ITERATIONS_SUCCESS
,
iterations
);
return
iterations
;
})
.
catch
((
e
)
=>
{
commit
(
types
.
RECEIVE_ITERATIONS_FAILURE
);
throw
e
;
});
},
fetchMilestones
({
state
,
commit
},
searchTerm
)
{
fetchMilestones
({
state
,
commit
},
searchTerm
)
{
commit
(
types
.
RECEIVE_MILESTONES_REQUEST
);
commit
(
types
.
RECEIVE_MILESTONES_REQUEST
);
...
...
app/assets/javascripts/boards/stores/mutation_types.js
View file @
f69689ca
...
@@ -41,3 +41,7 @@ export const ADD_LIST_TO_HIGHLIGHTED_LISTS = 'ADD_LIST_TO_HIGHLIGHTED_LISTS';
...
@@ -41,3 +41,7 @@ export const ADD_LIST_TO_HIGHLIGHTED_LISTS = 'ADD_LIST_TO_HIGHLIGHTED_LISTS';
export
const
REMOVE_LIST_FROM_HIGHLIGHTED_LISTS
=
'
REMOVE_LIST_FROM_HIGHLIGHTED_LISTS
'
;
export
const
REMOVE_LIST_FROM_HIGHLIGHTED_LISTS
=
'
REMOVE_LIST_FROM_HIGHLIGHTED_LISTS
'
;
export
const
RESET_BOARD_ITEM_SELECTION
=
'
RESET_BOARD_ITEM_SELECTION
'
;
export
const
RESET_BOARD_ITEM_SELECTION
=
'
RESET_BOARD_ITEM_SELECTION
'
;
export
const
SET_ERROR
=
'
SET_ERROR
'
;
export
const
SET_ERROR
=
'
SET_ERROR
'
;
export
const
RECEIVE_ITERATIONS_REQUEST
=
'
RECEIVE_ITERATIONS_REQUEST
'
;
export
const
RECEIVE_ITERATIONS_SUCCESS
=
'
RECEIVE_ITERATIONS_SUCCESS
'
;
export
const
RECEIVE_ITERATIONS_FAILURE
=
'
RECEIVE_ITERATIONS_FAILURE
'
;
app/assets/javascripts/boards/stores/mutations.js
View file @
f69689ca
...
@@ -65,6 +65,20 @@ export default {
...
@@ -65,6 +65,20 @@ export default {
);
);
},
},
[
mutationTypes
.
RECEIVE_ITERATIONS_REQUEST
](
state
)
{
state
.
iterationsLoading
=
true
;
},
[
mutationTypes
.
RECEIVE_ITERATIONS_SUCCESS
](
state
,
iterations
)
{
state
.
iterations
=
iterations
;
state
.
iterationsLoading
=
false
;
},
[
mutationTypes
.
RECEIVE_ITERATIONS_FAILURE
](
state
)
{
state
.
iterationsLoading
=
false
;
state
.
error
=
__
(
'
Failed to load iterations.
'
);
},
[
mutationTypes
.
SET_ACTIVE_ID
](
state
,
{
id
,
sidebarType
})
{
[
mutationTypes
.
SET_ACTIVE_ID
](
state
,
{
id
,
sidebarType
})
{
state
.
activeId
=
id
;
state
.
activeId
=
id
;
state
.
sidebarType
=
sidebarType
;
state
.
sidebarType
=
sidebarType
;
...
...
app/assets/javascripts/boards/stores/state.js
View file @
f69689ca
...
@@ -31,6 +31,8 @@ export default () => ({
...
@@ -31,6 +31,8 @@ export default () => ({
},
},
selectedProject
:
{},
selectedProject
:
{},
error
:
undefined
,
error
:
undefined
,
iterations
:
[],
iterationsLoading
:
false
,
addColumnForm
:
{
addColumnForm
:
{
visible
:
false
,
visible
:
false
,
columnType
:
ListType
.
label
,
columnType
:
ListType
.
label
,
...
...
ee/app/assets/javascripts/boards/stores/actions.js
View file @
f69689ca
...
@@ -32,10 +32,8 @@ import createEpicBoardListMutation from '../graphql/epic_board_list_create.mutat
...
@@ -32,10 +32,8 @@ import createEpicBoardListMutation from '../graphql/epic_board_list_create.mutat
import
epicCreateMutation
from
'
../graphql/epic_create.mutation.graphql
'
;
import
epicCreateMutation
from
'
../graphql/epic_create.mutation.graphql
'
;
import
epicMoveListMutation
from
'
../graphql/epic_move_list.mutation.graphql
'
;
import
epicMoveListMutation
from
'
../graphql/epic_move_list.mutation.graphql
'
;
import
epicsSwimlanesQuery
from
'
../graphql/epics_swimlanes.query.graphql
'
;
import
epicsSwimlanesQuery
from
'
../graphql/epics_swimlanes.query.graphql
'
;
import
groupBoardIterationsQuery
from
'
../graphql/group_board_iterations.query.graphql
'
;
import
listUpdateLimitMetricsMutation
from
'
../graphql/list_update_limit_metrics.mutation.graphql
'
;
import
listUpdateLimitMetricsMutation
from
'
../graphql/list_update_limit_metrics.mutation.graphql
'
;
import
listsEpicsQuery
from
'
../graphql/lists_epics.query.graphql
'
;
import
listsEpicsQuery
from
'
../graphql/lists_epics.query.graphql
'
;
import
projectBoardIterationsQuery
from
'
../graphql/project_board_iterations.query.graphql
'
;
import
updateBoardEpicUserPreferencesMutation
from
'
../graphql/update_board_epic_user_preferences.mutation.graphql
'
;
import
updateBoardEpicUserPreferencesMutation
from
'
../graphql/update_board_epic_user_preferences.mutation.graphql
'
;
import
updateEpicLabelsMutation
from
'
../graphql/update_epic_labels.mutation.graphql
'
;
import
updateEpicLabelsMutation
from
'
../graphql/update_epic_labels.mutation.graphql
'
;
...
@@ -420,50 +418,6 @@ export default {
...
@@ -420,50 +418,6 @@ export default {
);
);
},
},
fetchIterations
({
state
,
commit
},
title
)
{
commit
(
types
.
RECEIVE_ITERATIONS_REQUEST
);
const
{
fullPath
,
boardType
}
=
state
;
const
variables
=
{
fullPath
,
title
,
};
let
query
;
if
(
boardType
===
BoardType
.
project
)
{
query
=
projectBoardIterationsQuery
;
}
if
(
boardType
===
BoardType
.
group
)
{
query
=
groupBoardIterationsQuery
;
}
if
(
!
query
)
{
// eslint-disable-next-line @gitlab/require-i18n-strings
throw
new
Error
(
'
Unknown board type
'
);
}
return
gqlClient
.
query
({
query
,
variables
,
})
.
then
(({
data
})
=>
{
const
errors
=
data
[
boardType
]?.
errors
;
const
iterations
=
data
[
boardType
]?.
iterations
.
nodes
;
if
(
errors
?.[
0
])
{
throw
new
Error
(
errors
[
0
]);
}
commit
(
types
.
RECEIVE_ITERATIONS_SUCCESS
,
iterations
);
})
.
catch
((
e
)
=>
{
commit
(
types
.
RECEIVE_ITERATIONS_FAILURE
);
throw
e
;
});
},
fetchAssignees
({
state
,
commit
},
search
)
{
fetchAssignees
({
state
,
commit
},
search
)
{
commit
(
types
.
RECEIVE_ASSIGNEES_REQUEST
);
commit
(
types
.
RECEIVE_ASSIGNEES_REQUEST
);
...
...
ee/app/assets/javascripts/boards/stores/mutation_types.js
View file @
f69689ca
...
@@ -15,9 +15,6 @@ export const SET_SHOW_LABELS = 'SET_SHOW_LABELS';
...
@@ -15,9 +15,6 @@ export const SET_SHOW_LABELS = 'SET_SHOW_LABELS';
export
const
MOVE_EPIC
=
'
MOVE_EPIC
'
;
export
const
MOVE_EPIC
=
'
MOVE_EPIC
'
;
export
const
MOVE_EPIC_FAILURE
=
'
MOVE_EPIC_FAILURE
'
;
export
const
MOVE_EPIC_FAILURE
=
'
MOVE_EPIC_FAILURE
'
;
export
const
SET_BOARD_EPIC_USER_PREFERENCES
=
'
SET_BOARD_EPIC_USER_PREFERENCES
'
;
export
const
SET_BOARD_EPIC_USER_PREFERENCES
=
'
SET_BOARD_EPIC_USER_PREFERENCES
'
;
export
const
RECEIVE_ITERATIONS_REQUEST
=
'
RECEIVE_ITERATIONS_REQUEST
'
;
export
const
RECEIVE_ITERATIONS_SUCCESS
=
'
RECEIVE_ITERATIONS_SUCCESS
'
;
export
const
RECEIVE_ITERATIONS_FAILURE
=
'
RECEIVE_ITERATIONS_FAILURE
'
;
export
const
RECEIVE_ASSIGNEES_REQUEST
=
'
RECEIVE_ASSIGNEES_REQUEST
'
;
export
const
RECEIVE_ASSIGNEES_REQUEST
=
'
RECEIVE_ASSIGNEES_REQUEST
'
;
export
const
RECEIVE_ASSIGNEES_SUCCESS
=
'
RECEIVE_ASSIGNEES_SUCCESS
'
;
export
const
RECEIVE_ASSIGNEES_SUCCESS
=
'
RECEIVE_ASSIGNEES_SUCCESS
'
;
export
const
RECEIVE_ASSIGNEES_FAILURE
=
'
RECEIVE_ASSIGNEES_FAILURE
'
;
export
const
RECEIVE_ASSIGNEES_FAILURE
=
'
RECEIVE_ASSIGNEES_FAILURE
'
;
ee/app/assets/javascripts/boards/stores/mutations.js
View file @
f69689ca
...
@@ -171,20 +171,6 @@ export default {
...
@@ -171,20 +171,6 @@ export default {
}
}
},
},
[
mutationTypes
.
RECEIVE_ITERATIONS_REQUEST
](
state
)
{
state
.
iterationsLoading
=
true
;
},
[
mutationTypes
.
RECEIVE_ITERATIONS_SUCCESS
](
state
,
iterations
)
{
state
.
iterations
=
iterations
;
state
.
iterationsLoading
=
false
;
},
[
mutationTypes
.
RECEIVE_ITERATIONS_FAILURE
](
state
)
{
state
.
iterationsLoading
=
false
;
state
.
error
=
__
(
'
Failed to load iterations.
'
);
},
[
mutationTypes
.
RECEIVE_ASSIGNEES_REQUEST
](
state
)
{
[
mutationTypes
.
RECEIVE_ASSIGNEES_REQUEST
](
state
)
{
state
.
assigneesLoading
=
true
;
state
.
assigneesLoading
=
true
;
},
},
...
...
ee/app/assets/javascripts/boards/stores/state.js
View file @
f69689ca
...
@@ -15,8 +15,6 @@ export default () => ({
...
@@ -15,8 +15,6 @@ export default () => ({
epicsEndCursor
:
null
,
epicsEndCursor
:
null
,
epics
:
[],
epics
:
[],
epicsFlags
:
{},
epicsFlags
:
{},
iterations
:
[],
iterationsLoading
:
false
,
assignees
:
[],
assignees
:
[],
assigneesLoading
:
false
,
assigneesLoading
:
false
,
});
});
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