2014-09-02 18:07:02 +05:30
|
|
|
module Issues
|
|
|
|
class UpdateService < Issues::BaseService
|
|
|
|
def execute(issue)
|
2015-12-23 02:04:40 +05:30
|
|
|
update(issue)
|
2015-11-26 14:37:03 +05:30
|
|
|
end
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-11-26 14:37:03 +05:30
|
|
|
def handle_changes(issue)
|
|
|
|
if issue.previous_changes.include?('milestone_id')
|
|
|
|
create_milestone_note(issue)
|
|
|
|
end
|
2015-09-11 14:41:01 +05:30
|
|
|
|
2015-11-26 14:37:03 +05:30
|
|
|
if issue.previous_changes.include?('assignee_id')
|
|
|
|
create_assignee_note(issue)
|
|
|
|
notification_service.reassigned_issue(issue, current_user)
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
2015-12-23 02:04:40 +05:30
|
|
|
end
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-12-23 02:04:40 +05:30
|
|
|
def reopen_service
|
|
|
|
Issues::ReopenService
|
|
|
|
end
|
|
|
|
|
|
|
|
def close_service
|
|
|
|
Issues::CloseService
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|