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
9822c626
Commit
9822c626
authored
Dec 19, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use new issue order endpoint
parent
ba517230
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
app/assets/javascripts/issuable/related_issues/components/related_issues_root.vue
...ssuable/related_issues/components/related_issues_root.vue
+5
-2
app/assets/javascripts/issuable/related_issues/services/related_issues_service.js
...ssuable/related_issues/services/related_issues_service.js
+5
-6
No files found.
app/assets/javascripts/issuable/related_issues/components/related_issues_root.vue
View file @
9822c626
...
...
@@ -95,7 +95,7 @@ export default {
const
issueToRemove
=
_
.
find
(
this
.
state
.
relatedIssues
,
issue
=>
issue
.
id
===
idToRemove
);
if
(
issueToRemove
)
{
this
.
service
.
removeRelatedIssue
(
issueToRemove
.
destroy_
relation_path
)
this
.
service
.
removeRelatedIssue
(
issueToRemove
.
relation_path
)
.
then
(
res
=>
res
.
json
())
.
then
((
data
)
=>
{
this
.
store
.
setRelatedIssues
(
data
.
issues
);
...
...
@@ -164,7 +164,10 @@ export default {
const
issue
=
_
.
find
(
this
.
state
.
relatedIssues
,
issue
=>
issue
.
id
===
issueId
);
if
(
issue
)
{
this
.
service
.
saveIssueOrder
(
issue
.
epic_issue_id
,
newOrder
);
this
.
service
.
saveRelatedIssueOrder
({
endpoint
:
issue
.
related_path
,
position
:
newOrder
,
});
}
},
...
...
app/assets/javascripts/issuable/related_issues/services/related_issues_service.js
View file @
9822c626
...
...
@@ -6,7 +6,6 @@ Vue.use(vueResource);
class
RelatedIssuesService
{
constructor
(
endpoint
)
{
this
.
relatedIssuesResource
=
Vue
.
resource
(
endpoint
);
this
.
reorderIssuesResource
=
Vue
.
resource
(
`
${
endpoint
}
{/id}/order`
);
}
fetchRelatedIssues
()
{
...
...
@@ -19,11 +18,11 @@ class RelatedIssuesService {
});
}
save
IssueOrder
(
issueId
,
position
)
{
return
this
.
reorderIssuesResource
.
update
(
{
id
:
issueId
,
},
{
position
,
save
RelatedIssueOrder
({
endpoint
,
position
}
)
{
return
Vue
.
http
.
put
(
endpoint
,
{
epic
:
{
position
,
}
,
});
}
...
...
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