Skip to content

Assign anotther tracker to quto created subtask #332

@fabianocruzdf

Description

@fabianocruzdf

Hello!

I'm using the following script to create new subtasks, but, depending the father task tracker, I need to set another tracker to suto created subtask. Here's is a example:

If tracker is feature then autocreated subtask must have a suport tracker type.

My script:

if @var //populated on before_save
issue = Issue.new
issue.tracker_id = tracker_id
issue.project_id = project_id // <-- Here's my problem, i have to set another id, but everything i put here is ignored, and subtask created has the same tracker_id of father task.
issue.subject = 'Sub-issue'
issue.status_id = status_id
issue.priority_id = priority_id
issue.author_id = author_id
issue.parent_id = id
issue.save
end

can anyone help me with this?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions