diff options
author | 🙈 jacopo beschi 🙉 <intrip@gmail.com> | 2019-09-04 23:13:39 +0300 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-09-04 23:13:39 +0300 |
commit | 9c87275f6ef0b40d905929ce5bcd5480a6dfd369 (patch) | |
tree | 91c8f480de432496ff117dc86319ff98e067c28b /lib/gitlab | |
parent | 1961fd1f06d8028a971fed4adea38180999d70e9 (diff) |
Show meaningful message on /due quick action with invalid date
When using /due quick action with an invalid date a meaninful error
message is shown.
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/quick_actions/issue_actions.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/quick_actions/issue_actions.rb b/lib/gitlab/quick_actions/issue_actions.rb index da28fbf5be0..869627ac585 100644 --- a/lib/gitlab/quick_actions/issue_actions.rb +++ b/lib/gitlab/quick_actions/issue_actions.rb @@ -25,7 +25,11 @@ module Gitlab Chronic.parse(due_date_param).try(:to_date) end command :due do |due_date| - @updates[:due_date] = due_date if due_date + if due_date + @updates[:due_date] = due_date + else + @execution_message[:due] = _('Failed to set due date because the date format is invalid.') + end end desc _('Remove due date') |