diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-03 00:07:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-03 00:07:46 +0300 |
commit | 9579eee8954e0405c2dadb19c2a73c9597ce37ea (patch) | |
tree | d90223b7e449d8d25eef60ad16084ce0d2ca2b1b /app/services/quick_actions | |
parent | 0a9b6b99a9bdcacea434501320f1a8d131a33827 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/quick_actions')
-rw-r--r-- | app/services/quick_actions/target_service.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/services/quick_actions/target_service.rb b/app/services/quick_actions/target_service.rb index 9c228c27523..04ae5287302 100644 --- a/app/services/quick_actions/target_service.rb +++ b/app/services/quick_actions/target_service.rb @@ -4,6 +4,8 @@ module QuickActions class TargetService < BaseService def execute(type, type_iid) case type&.downcase + when 'workitem' + work_item(type_iid) when 'issue' issue(type_iid) when 'mergerequest' @@ -16,6 +18,12 @@ module QuickActions private # rubocop: disable CodeReuse/ActiveRecord + def work_item(type_iid) + WorkItems::WorkItemsFinder.new(current_user, project_id: project.id).find_by(iid: type_iid) + end + # rubocop: enable CodeReuse/ActiveRecord + + # rubocop: disable CodeReuse/ActiveRecord def issue(type_iid) return project.issues.build if type_iid.nil? |