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
88fae32d
Commit
88fae32d
authored
May 06, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Boards - Fix subgroup path
Remove broken group path getter for subgroups.
parent
6f0bab97
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
app/assets/javascripts/boards/stores/getters.js
app/assets/javascripts/boards/stores/getters.js
+1
-1
spec/frontend/boards/stores/getters_spec.js
spec/frontend/boards/stores/getters_spec.js
+9
-0
No files found.
app/assets/javascripts/boards/stores/getters.js
View file @
88fae32d
...
...
@@ -21,7 +21,7 @@ export default {
groupPathForActiveIssue
:
(
_
,
getters
)
=>
{
const
{
referencePath
=
''
}
=
getters
.
activeBoardItem
;
return
referencePath
.
slice
(
0
,
referencePath
.
i
ndexOf
(
'
/
'
));
return
referencePath
.
slice
(
0
,
referencePath
.
lastI
ndexOf
(
'
/
'
));
},
projectPathForActiveIssue
:
(
_
,
getters
)
=>
{
...
...
spec/frontend/boards/stores/getters_spec.js
View file @
88fae32d
...
...
@@ -110,6 +110,15 @@ describe('Boards - Getters', () => {
);
});
it('returns group path of last subgroup for the active issue', () => {
const mockActiveIssue = {
referencePath: 'gitlab-org/subgroup/subsubgroup/gitlab-test#1',
};
expect(getters.groupPathForActiveIssue({}, { activeBoardItem: mockActiveIssue })).toEqual(
'gitlab-org/subgroup/subsubgroup',
);
});
it('returns empty string as group path when active issue is an empty object', () => {
const mockActiveIssue = {};
expect(getters.groupPathForActiveIssue({}, { activeBoardItem: mockActiveIssue })).toEqual('');
...
...
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