BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
ed67ba96
Unverified
Commit
ed67ba96
authored
Apr 02, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for close/reopen actions in update service
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
cc773654
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
reopen_service.rb
app/services/issues/reopen_service.rb
+1
-1
update_service.rb
app/services/issues/update_service.rb
+10
-1
No files found.
app/services/issues/reopen_service.rb
View file @
ed67ba96
...
...
@@ -3,7 +3,7 @@ module Issues
def
execute
(
issue
)
if
issue
.
reopen
event_service
.
reopen_issue
(
issue
,
current_user
)
create_note
(
issue
,
commit
)
create_note
(
issue
)
execute_hooks
(
issue
)
end
...
...
app/services/issues/update_service.rb
View file @
ed67ba96
module
Issues
class
UpdateService
<
BaseService
def
execute
(
issue
)
if
issue
.
update_attributes
(
params
)
state
=
params
.
delete
(
'state_event'
)
case
state
when
'reopen'
Issues
::
ReopenService
.
new
(
project
,
current_user
,
{}).
execute
(
issue
)
when
'close'
Issues
::
CloseService
.
new
(
project
,
current_user
,
{}).
execute
(
issue
)
end
if
params
.
present?
&&
issue
.
update_attributes
(
params
)
issue
.
reset_events_cache
if
issue
.
is_being_reassigned?
...
...
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