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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
0e5fbb29
Commit
0e5fbb29
authored
Jul 08, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused `task_[un]check` states from Update services
These were left over from the old Task handling.
parent
d991e3e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
11 deletions
+2
-11
app/services/issues/update_service.rb
app/services/issues/update_service.rb
+1
-6
app/services/merge_requests/update_service.rb
app/services/merge_requests/update_service.rb
+1
-5
No files found.
app/services/issues/update_service.rb
View file @
0e5fbb29
...
...
@@ -8,10 +8,6 @@ module Issues
Issues
::
ReopenService
.
new
(
project
,
current_user
,
{}).
execute
(
issue
)
when
'close'
Issues
::
CloseService
.
new
(
project
,
current_user
,
{}).
execute
(
issue
)
when
'task_check'
issue
.
update_nth_task
(
params
[
:task_num
].
to_i
,
true
)
when
'task_uncheck'
issue
.
update_nth_task
(
params
[
:task_num
].
to_i
,
false
)
end
params
[
:assignee_id
]
=
""
if
params
[
:assignee_id
]
==
IssuableFinder
::
NONE
...
...
@@ -20,8 +16,7 @@ module Issues
filter_params
old_labels
=
issue
.
labels
.
to_a
if
params
.
present?
&&
issue
.
update_attributes
(
params
.
except
(
:state_event
,
:task_num
))
if
params
.
present?
&&
issue
.
update_attributes
(
params
.
except
(
:state_event
))
issue
.
reset_events_cache
if
issue
.
labels
!=
old_labels
...
...
app/services/merge_requests/update_service.rb
View file @
0e5fbb29
...
...
@@ -18,10 +18,6 @@ module MergeRequests
MergeRequests
::
ReopenService
.
new
(
project
,
current_user
,
{}).
execute
(
merge_request
)
when
'close'
MergeRequests
::
CloseService
.
new
(
project
,
current_user
,
{}).
execute
(
merge_request
)
when
'task_check'
merge_request
.
update_nth_task
(
params
[
:task_num
].
to_i
,
true
)
when
'task_uncheck'
merge_request
.
update_nth_task
(
params
[
:task_num
].
to_i
,
false
)
end
params
[
:assignee_id
]
=
""
if
params
[
:assignee_id
]
==
IssuableFinder
::
NONE
...
...
@@ -31,7 +27,7 @@ module MergeRequests
old_labels
=
merge_request
.
labels
.
to_a
if
params
.
present?
&&
merge_request
.
update_attributes
(
params
.
except
(
:state_event
,
:task_num
)
params
.
except
(
:state_event
)
)
merge_request
.
reset_events_cache
...
...
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