Welcome to mirror list, hosted at ThFree Co, Russian Federation.

reopen_service.rb « issues « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e48ca359f4f9905fbcb169792611b885f0529f81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module Issues
  class ReopenService < Issues::BaseService
    def execute(issue)
      if issue.reopen
        event_service.reopen_issue(issue, current_user)
        create_note(issue)
        notification_service.reopen_issue(issue, current_user)
        execute_hooks(issue, 'reopen')
      end

      issue
    end

    private

    def create_note(issue)
      SystemNoteService.change_status(issue, issue.project, current_user, issue.state, nil)
    end
  end
end