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
b896a853
Commit
b896a853
authored
Sep 06, 2019
by
Winnie Hellmann
Committed by
Kushal Pandya
Sep 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show weight on new board issue (CE-backport)
parent
a7f3d980
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
1 deletion
+33
-1
app/assets/javascripts/boards/components/board_new_issue.vue
app/assets/javascripts/boards/components/board_new_issue.vue
+5
-1
spec/javascripts/boards/board_new_issue_spec.js
spec/javascripts/boards/board_new_issue_spec.js
+26
-0
spec/javascripts/boards/mock_data.js
spec/javascripts/boards/mock_data.js
+2
-0
No files found.
app/assets/javascripts/boards/components/board_new_issue.vue
View file @
b896a853
...
...
@@ -2,9 +2,9 @@
import
$
from
'
jquery
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
getMilestone
}
from
'
ee_else_ce/boards/boards_util
'
;
import
ListIssue
from
'
ee_else_ce/boards/models/issue
'
;
import
eventHub
from
'
../eventhub
'
;
import
ProjectSelect
from
'
./project_select.vue
'
;
import
ListIssue
from
'
../models/issue
'
;
import
boardsStore
from
'
../stores/boards_store
'
;
export
default
{
...
...
@@ -54,6 +54,9 @@ export default {
const
assignees
=
this
.
list
.
assignee
?
[
this
.
list
.
assignee
]
:
[];
const
milestone
=
getMilestone
(
this
.
list
);
const
{
weightFeatureAvailable
}
=
boardsStore
;
const
{
weight
}
=
weightFeatureAvailable
?
boardsStore
.
state
.
currentBoard
:
{};
const
issue
=
new
ListIssue
({
title
:
this
.
title
,
labels
,
...
...
@@ -61,6 +64,7 @@ export default {
assignees
,
milestone
,
project_id
:
this
.
selectedProject
.
id
,
weight
,
});
eventHub
.
$emit
(
`scroll-board-list-
${
this
.
list
.
id
}
`
);
...
...
spec/javascripts/boards/board_new_issue_spec.js
View file @
b896a853
...
...
@@ -171,6 +171,32 @@ describe('Issue boards new issue form', () => {
.
then
(
done
)
.
catch
(
done
.
fail
);
});
it
(
'
sets detail weight after submit
'
,
done
=>
{
boardsStore
.
weightFeatureAvailable
=
true
;
vm
.
title
=
'
submit issue
'
;
Vue
.
nextTick
()
.
then
(
submitIssue
)
.
then
(()
=>
{
expect
(
boardsStore
.
detail
.
list
.
weight
).
toBe
(
list
.
weight
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
it
(
'
does not set detail weight after submit
'
,
done
=>
{
boardsStore
.
weightFeatureAvailable
=
false
;
vm
.
title
=
'
submit issue
'
;
Vue
.
nextTick
()
.
then
(
submitIssue
)
.
then
(()
=>
{
expect
(
boardsStore
.
detail
.
list
.
weight
).
toBe
(
list
.
weight
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
});
describe
(
'
submit error
'
,
()
=>
{
...
...
spec/javascripts/boards/mock_data.js
View file @
b896a853
...
...
@@ -12,6 +12,7 @@ export const listObj = {
position
:
0
,
title
:
'
Test
'
,
list_type
:
'
label
'
,
weight
:
3
,
label
:
{
id
:
5000
,
title
:
'
Testing
'
,
...
...
@@ -26,6 +27,7 @@ export const listObjDuplicate = {
position
:
1
,
title
:
'
Test
'
,
list_type
:
'
label
'
,
weight
:
3
,
label
:
{
id
:
listObj
.
label
.
id
,
title
:
'
Testing
'
,
...
...
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