Feature #23349
open
Force comment on status change
Added by Anonymous about 8 years ago.
Updated over 1 year ago.
Description
When an issue or feature request has its status changed, especially to status "rejected", comments are very helpful but are often omitted. Could it be implemented, so that a status change requires the comment field to be filled?
- Related to Feature #12236: Option to make Comment field required added
We use the custom workflow plugin to accomplish this, which lets you add simple scripts that execute before or after save to add custom behavior such as this.
Plugins Directory » Custom Workflows
Thanks for the hint. I will take at a look at the plugin.
Jake Kemme wrote:
We use the custom workflow plugin to accomplish this, which lets you add simple scripts that execute before or after save to add custom behavior such as this.
Plugins Directory » Custom Workflows
If using custom workflow plugin , one can use this code in "before_save"
if @issue.status_id_changed?
unless @issue.current_journal.nil? #check if the issue has a journal
if @issue.current_journal.notes.empty? #test if notes has content
errors.add :base, 'Cannot resolve issue without comment.'
end
end
end
https://github.com/anteo/redmine_custom_workflows/issues/57#issuecomment-233430599
Also available in: Atom
PDF