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
e82a9adb
Commit
e82a9adb
authored
Feb 26, 2020
by
Marvin Karegyeya
Committed by
Paul Slaughter
Feb 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove refreshData function logic from issue.js
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/21409
parent
870b6dc6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
30 deletions
+42
-30
app/assets/javascripts/boards/models/issue.js
app/assets/javascripts/boards/models/issue.js
+1
-30
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+36
-0
changelogs/unreleased/Remove-refreshData-function-logic-from-issue-js.yml
...eased/Remove-refreshData-function-logic-from-issue-js.yml
+5
-0
No files found.
app/assets/javascripts/boards/models/issue.js
View file @
e82a9adb
...
...
@@ -26,36 +26,7 @@ class ListIssue {
}
refreshData
(
obj
,
defaultAvatar
)
{
this
.
id
=
obj
.
id
;
this
.
iid
=
obj
.
iid
;
this
.
title
=
obj
.
title
;
this
.
confidential
=
obj
.
confidential
;
this
.
dueDate
=
obj
.
due_date
;
this
.
sidebarInfoEndpoint
=
obj
.
issue_sidebar_endpoint
;
this
.
referencePath
=
obj
.
reference_path
;
this
.
path
=
obj
.
real_path
;
this
.
toggleSubscriptionEndpoint
=
obj
.
toggle_subscription_endpoint
;
this
.
project_id
=
obj
.
project_id
;
this
.
timeEstimate
=
obj
.
time_estimate
;
this
.
assignableLabelsEndpoint
=
obj
.
assignable_labels_endpoint
;
this
.
blocked
=
obj
.
blocked
;
if
(
obj
.
project
)
{
this
.
project
=
new
IssueProject
(
obj
.
project
);
}
if
(
obj
.
milestone
)
{
this
.
milestone
=
new
ListMilestone
(
obj
.
milestone
);
this
.
milestone_id
=
obj
.
milestone
.
id
;
}
if
(
obj
.
labels
)
{
this
.
labels
=
obj
.
labels
.
map
(
label
=>
new
ListLabel
(
label
));
}
if
(
obj
.
assignees
)
{
this
.
assignees
=
obj
.
assignees
.
map
(
a
=>
new
ListAssignee
(
a
,
defaultAvatar
));
}
boardsStore
.
refreshIssueData
(
this
,
obj
,
defaultAvatar
);
}
addLabel
(
label
)
{
...
...
app/assets/javascripts/boards/stores/boards_store.js
View file @
e82a9adb
...
...
@@ -12,6 +12,10 @@ import axios from '~/lib/utils/axios_utils';
import
{
mergeUrlParams
}
from
'
~/lib/utils/url_utility
'
;
import
eventHub
from
'
../eventhub
'
;
import
{
ListType
}
from
'
../constants
'
;
import
IssueProject
from
'
../models/project
'
;
import
ListLabel
from
'
../models/label
'
;
import
ListAssignee
from
'
../models/assignee
'
;
import
ListMilestone
from
'
../models/milestone
'
;
const
boardsStore
=
{
disabled
:
false
,
...
...
@@ -593,6 +597,38 @@ const boardsStore = {
clearMultiSelect
()
{
this
.
multiSelect
.
list
=
[];
},
refreshIssueData
(
issue
,
obj
,
defaultAvatar
)
{
issue
.
id
=
obj
.
id
;
issue
.
iid
=
obj
.
iid
;
issue
.
title
=
obj
.
title
;
issue
.
confidential
=
obj
.
confidential
;
issue
.
dueDate
=
obj
.
due_date
;
issue
.
sidebarInfoEndpoint
=
obj
.
issue_sidebar_endpoint
;
issue
.
referencePath
=
obj
.
reference_path
;
issue
.
path
=
obj
.
real_path
;
issue
.
toggleSubscriptionEndpoint
=
obj
.
toggle_subscription_endpoint
;
issue
.
project_id
=
obj
.
project_id
;
issue
.
timeEstimate
=
obj
.
time_estimate
;
issue
.
assignableLabelsEndpoint
=
obj
.
assignable_labels_endpoint
;
issue
.
blocked
=
obj
.
blocked
;
if
(
obj
.
project
)
{
issue
.
project
=
new
IssueProject
(
obj
.
project
);
}
if
(
obj
.
milestone
)
{
issue
.
milestone
=
new
ListMilestone
(
obj
.
milestone
);
issue
.
milestone_id
=
obj
.
milestone
.
id
;
}
if
(
obj
.
labels
)
{
issue
.
labels
=
obj
.
labels
.
map
(
label
=>
new
ListLabel
(
label
));
}
if
(
obj
.
assignees
)
{
issue
.
assignees
=
obj
.
assignees
.
map
(
a
=>
new
ListAssignee
(
a
,
defaultAvatar
));
}
},
};
BoardsStoreEE
.
initEESpecific
(
boardsStore
);
...
...
changelogs/unreleased/Remove-refreshData-function-logic-from-issue-js.yml
0 → 100644
View file @
e82a9adb
---
title
:
Moves refreshData from issue model to board store
merge_request
:
21409
author
:
nuwe1
type
:
other
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