I have read https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Createasub-task and this quite clear to me, what is not clear is if I only want to auto-create the sub-task as a post-function if the parent task has a specific value for a custom field.
There's no way to indicate conditionality - which I am guessing needs ot be done as a custom function - is there a complete example anywhere of a script that does exactly what the built-in does, but only if a particular custom field has a specific value?
Community moderators have prevented the ability to post new answers.
Hello Rob,
you can add a condition to the post function.
Here is an example for issue type combined with a multi select list.
issue.issueTypeObject.name == 'Windows 7 Migration' && cfValues['Migration Sub Tasks']*.value.contains("IT-Network")
Regards,
Tim
You would need to write the groovy code to implement your condition check and only execute the create portion of the code if the condition was met.
For those that don't want to do the programming, Create on Transition for JIRA's Create Subtask has conditioning built in expressed using regular expressions and Substitution variables.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.