I'm using Automation for Jira to automatically create a comment if the Approving Role for the current sub-task is "name of the role" but the value of the "name of the role" field within the parent of the sub-task does not equal the initiator of the workflow transition.
Instead of having to add if/else statements for every possible value {{issue.parent.name of the role.name}}, where "name of the role" is both the value of the sub-task's "Approving Role" field and the name of the custom field in the parent from which to grab a username for comparison to the initiator name, it would be great if the following were supported:
Condition:
{{initiator.name}}
does not equal
{{issue.parent.{{issue.Approving Role}}.name}}
Add a post-function in your workflow's "Create" event so that it can do whatever you want, like changing the assignee to someone based on your conditions above. Take a look a the JIRA Misc Workflow Plugin and the JIRA ScriptRunner to accomplish this, they have tons of information and samples in their documentation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.