diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-02 16:37:57 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-02 16:37:57 +0400 |
commit | 0d41f6f0a3ab23cee63e349eda5fb79240734dd4 (patch) | |
tree | c991808070d8383ee311b7f1d459aa530b382faf /app | |
parent | c4e81ed9de6a5bbfe089e9b61ca0400167e489f3 (diff) |
Remove issue observer
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/observers/issue_observer.rb | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/app/observers/issue_observer.rb b/app/observers/issue_observer.rb deleted file mode 100644 index b4880b12fd7..00000000000 --- a/app/observers/issue_observer.rb +++ /dev/null @@ -1,29 +0,0 @@ -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 |