diff options
Diffstat (limited to 'app/services/issues')
-rw-r--r-- | app/services/issues/update_service.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/services/issues/update_service.rb b/app/services/issues/update_service.rb index 9ede5ef728b..4e52acfcdda 100644 --- a/app/services/issues/update_service.rb +++ b/app/services/issues/update_service.rb @@ -77,6 +77,7 @@ module Issues end handle_severity_change(issue, old_severity) + handle_issue_type_change(issue) end def handle_assignee_changes(issue, old_assignees) @@ -218,6 +219,16 @@ module Issues def remove_incident_label?(issue) issue.issue_type != params[:issue_type] && issue.incident? end + + def handle_issue_type_change(issue) + return unless issue.previous_changes.include?('issue_type') + + do_handle_issue_type_change(issue) + end + + def do_handle_issue_type_change(issue) + SystemNoteService.change_issue_type(issue, current_user) + end end end |