access specific subsystem owner

How can i set Assignee to an issue that current subsystem is A but on specific state change i want to set assignee from Subsystem B without changing the subsystem.

Imagine case that code goes to State 'completed' and until this case it is assigned to Sybsystem owner. Subsystems like frontend,backend.....

There is a Subsystem named as Management and the assignee there is a user of the project in Management team.

I want to reassing the task on completed state to the owner of that Management Subsystem.

i can not do 

issue.fields.Assignee = ctx.Subsystem.Management.owner 

cause ctx.Subsystem is undefined.

This is what i get when i call:


problem was that to user ctx.Subsystem you need to define it in the requirements and each of the Subsystems also as Management: {}. 

case solved


Thank you for sharing the solution! Have a nice weekend!

Please sign in to leave a comment.