diff options
author | Manolis Mavrofidis <mavrofidise@gmail.com> | 2017-08-09 18:37:06 +0300 |
---|---|---|
committer | manolis <mavrofidise@gmail.com> | 2017-08-31 23:30:36 +0300 |
commit | 7e71f958ac721f5c36c20a5366c1e46adce4c67d (patch) | |
tree | 63b74b20bdb22d42afcd82764fdf97f01d8c655a /app/services/quick_actions | |
parent | 420d835e5fb41e1c3291a814f807b555b24646ca (diff) |
/move project functionality. Squash commit.
Update to add all issues to be updated.
Added functionality, proper tests, documentation and changelog.
Diffstat (limited to 'app/services/quick_actions')
-rw-r--r-- | app/services/quick_actions/interpret_service.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/services/quick_actions/interpret_service.rb b/app/services/quick_actions/interpret_service.rb index c7832c47e1a..9cdb9935bea 100644 --- a/app/services/quick_actions/interpret_service.rb +++ b/app/services/quick_actions/interpret_service.rb @@ -505,6 +505,24 @@ module QuickActions end end + desc 'Move this issue to another project.' + explanation do |path_to_project| + "Moves this issue to #{path_to_project}." + end + params 'path/to/project' + condition do + issuable.is_a?(Issue) && + issuable.persisted? && + current_user.can?(:"admin_#{issuable.to_ability_name}", project) + end + command :move do |target_project_path| + target_project = Project.find_by_full_path(target_project_path) + + if target_project.present? + @updates[:target_project] = target_project + end + end + def extract_users(params) return [] if params.nil? |