Commit 0d41f6f0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Remove issue observer

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent c4e81ed9
class IssueObserver < BaseObserver
def after_close(issue, transition)
notification.close_issue(issue, current_user)
event_service.close_issue(issue, current_user)
create_note(issue)
execute_hooks(issue)
end
def after_reopen(issue, transition)
event_service.reopen_issue(issue, current_user)
create_note(issue)
execute_hooks(issue)
end
protected
# Create issue note with service comment like 'Status changed to closed'
def create_note(issue)
Note.create_status_change_note(issue, issue.project, current_user, issue.state, current_commit)
end
def create_assignee_note(issue)
Note.create_assignee_change_note(issue, issue.project, current_user, issue.assignee)
end
def execute_hooks(issue)
issue.project.execute_hooks(issue.to_hook_data, :issue_hooks)
end
end
...@@ -21,7 +21,6 @@ module Gitlab ...@@ -21,7 +21,6 @@ module Gitlab
# Activate observers that should always be running. # Activate observers that should always be running.
config.active_record.observers = :milestone_observer, config.active_record.observers = :milestone_observer,
:project_activity_cache_observer, :project_activity_cache_observer,
:issue_observer,
:key_observer, :key_observer,
:merge_request_observer, :merge_request_observer,
:note_observer, :note_observer,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment