https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292016-07-18T07:03:34ZRedmineRedmine - Feature #23349: Force comment on status changehttps://www.redmine.org/issues/23349?journal_id=722482016-07-18T07:03:34ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/12236">Feature #12236</a>: Option to make Comment field required</i> added</li></ul> Redmine - Feature #23349: Force comment on status changehttps://www.redmine.org/issues/23349?journal_id=722722016-07-18T19:39:44ZJake Kemme
<ul></ul><p>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.</p>
<p><a href="http://www.redmine.org/plugins/custom-workflows" class="external">Plugins Directory » Custom Workflows</a></p> Redmine - Feature #23349: Force comment on status changehttps://www.redmine.org/issues/23349?journal_id=722882016-07-19T08:51:44ZJW Fuchs
<ul></ul><p>Thanks for the hint. I will take at a look at the plugin.</p> Redmine - Feature #23349: Force comment on status changehttps://www.redmine.org/issues/23349?journal_id=759932017-01-16T01:01:52ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-1 priority-4 priority-default" href="/issues/5553">Feature #5553</a>: Force closing message</i> added</li></ul> Redmine - Feature #23349: Force comment on status changehttps://www.redmine.org/issues/23349?journal_id=1094272023-03-02T08:05:06Zsosogh sosogh
<ul></ul><p>Jake Kemme wrote:</p>
<blockquote>
<p>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.</p>
<p><a href="http://www.redmine.org/plugins/custom-workflows" class="external">Plugins Directory » Custom Workflows</a></p>
</blockquote>
<p>If using custom workflow plugin , one can use this code in "before_save"</p>
<pre>
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
</pre>
<p><a class="external" href="https://github.com/anteo/redmine_custom_workflows/issues/57#issuecomment-233430599">https://github.com/anteo/redmine_custom_workflows/issues/57#issuecomment-233430599</a></p>