Answer the question
In order to leave comments, you need to log in
How to link tasks in Ruby (Redmine)?
Good afternoon!
The problem is this:
I am trying to build a workflow for Redmine using plugin https://github.com/anteo/redmine_custom_workflows
FAQ: https://github.com/anteo/redmine_custom_workflows/...
Examples: https://github.com /anteo/redmine_custom_workflows/...
My task is to create a related task (relation_type => 'relates') when a task is moved to a certain status (let it be status "9").
The plugin above has several fields:
Script to execute before saving the observable
@need_create = status_id_changed? && status_id==9 && !new_record? // Идет проверка на изменение статуса в 9
if @need_create
issue = Issue.new(
:author => User.current,
:project => project,
:tracker_id => 7,
:assigned_to => Group.find(17),
:subject => self.subject,
:description => self.description
)
issue.save!
end
:issue_to => id,
:relation_type => 'relates'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question