Example: Set assignee depending on issue type
My immediate question is: How can I set assignee base on issue type? e.g. issue type Bug = assignee X. I looked at the post-function Set a field as a function of other fields, but the "Target field to be set:" list does not contain Assignee. My not so immediate question is: How can I set assignee base on combinations of issue type and component? e.g. issue type Bug + Component A = assignee X, issue type Bug + Component B = assignee Y.
As you can see in the screenshot, "Assignee" is the third option in "Target field to be set" parameter of post-function Set a field as a function of other fields.
I answer to your second question: you can make setting of target field dependent on more than one field by setting an auxiliary field (for example, Ephemeral string 1) with composition of more than one field, and configure the parameter "Field to be checked for matching with the set of setting rules" with this auxiliary field.
We want to set "Assignee" in create transition with a user based on the value of "Issue type" and "Components":
We use post-function Set a field as a function of other fields to write the setting rules we want. In this case we write 4 rules for issue types "Bug" and "New Feature" and components "Component A" and "Component B". We write a 5th rule to cover rest of case (as an "else" in an "if" statement).
As in Components field you can set more than one component at the same time, it is convenient to write rules to specify precedence of components. For example, if you want "Component A" to have precedence over "Component B", you should write this set of rules:
(New Feature@.*Component A.*)kaku
(New Feature@Component B)newton
Once configured, transition looks like this:
Related Usage Examples