anteo / redmine_custom_workflows

Allows to create custom workflows for Redmine
http://www.redmine.org/plugins/custom-workflows
GNU General Public License v2.0
178 stars 72 forks source link

Help: how to add a change issue if milestone's status has changed #339

Open zdway10 opened 1 month ago

zdway10 commented 1 month ago

Ref "Example of creating subtask if the issue's status has changed," I want to add a change issue if milestone's status has changed except for milestone's status change to "done" or "resolved", how to realize it? mark: change issue is define in the redmine.xx.com/trackers and id is /trackers/5/


Example of creating subtask if the issue's status has changed Fill the "before save" script with:

@need_create = status_id_changed? && !new_record? Fill the "after save" script with:

if @need_create issue = Issue.new( author: User.current, project: project, tracker: tracker, assigned_to: author, parent_issue_id: id, subject: 'Subtask', description: 'Description') issue.save! end