diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-03-01 17:32:39 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-03-01 19:28:35 +0300 |
commit | 6297446d1773c95d86ecd31f591e1829b431f378 (patch) | |
tree | ff7ba9fc4c36eb5fb6893bfd98ad41424991f4d3 /app/services/quick_actions | |
parent | 7b31095ef85982af2aa3bcc5861c5c22e284b15c (diff) |
Move wip handling to MergeRequest::BaseService
Diffstat (limited to 'app/services/quick_actions')
-rw-r--r-- | app/services/quick_actions/interpret_service.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/quick_actions/interpret_service.rb b/app/services/quick_actions/interpret_service.rb index 1e9bd84e749..cba49faac31 100644 --- a/app/services/quick_actions/interpret_service.rb +++ b/app/services/quick_actions/interpret_service.rb @@ -347,9 +347,9 @@ module QuickActions "#{verb} this #{noun} as Work In Progress." end condition do - issuable.persisted? && - issuable.respond_to?(:work_in_progress?) && - current_user.can?(:"update_#{issuable.to_ability_name}", issuable) + issuable.respond_to?(:work_in_progress?) && + # Allow it to mark as WIP on MR creation page _or_ through MR notes. + (issuable.new_record? || current_user.can?(:"update_#{issuable.to_ability_name}", issuable)) end command :wip do @updates[:wip_event] = issuable.work_in_progress? ? 'unwip' : 'wip' |