Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zdway10 opened this issue May 22, 2024 · 0 comments
Open

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

zdway10 opened this issue May 22, 2024 · 0 comments

Comments

@zdway10
Copy link

zdway10 commented May 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants