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
85771063
Unverified
Commit
85771063
authored
Nov 13, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split complex method Issues::UpdateService#execute
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
7f0b4ce1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
update_service.rb
app/services/issues/update_service.rb
+16
-13
No files found.
app/services/issues/update_service.rb
View file @
85771063
...
...
@@ -22,24 +22,27 @@ module Issues
issue
,
issue
.
labels
-
old_labels
,
old_labels
-
issue
.
labels
)
end
if
issue
.
previous_changes
.
include?
(
'milestone_id'
)
create_milestone_note
(
issue
)
end
if
issue
.
previous_changes
.
include?
(
'assignee_id'
)
create_assignee_note
(
issue
)
notification_service
.
reassigned_issue
(
issue
,
current_user
)
end
if
issue
.
previous_changes
.
include?
(
'title'
)
create_title_change_note
(
issue
,
issue
.
previous_changes
[
'title'
].
first
)
end
handle_changes
(
issue
)
issue
.
create_new_cross_references!
(
current_user
)
execute_hooks
(
issue
,
'update'
)
end
issue
end
def
handle_changes
(
issue
)
if
issue
.
previous_changes
.
include?
(
'milestone_id'
)
create_milestone_note
(
issue
)
end
if
issue
.
previous_changes
.
include?
(
'assignee_id'
)
create_assignee_note
(
issue
)
notification_service
.
reassigned_issue
(
issue
,
current_user
)
end
if
issue
.
previous_changes
.
include?
(
'title'
)
create_title_change_note
(
issue
,
issue
.
previous_changes
[
'title'
].
first
)
end
end
end
end
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