I've been trying to create a Task with 3 Sub-Task through Automation but I keep getting the following error:
Hi @Ali Zalzar , welcome on the community . You can try to use smart value {{createdIssue}}. It should store the last created issue in the rule:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/ -> search for "{{createdIssue}}"
The problem is your choice of "current issue" in the sub-task settings.
There is no current issue in a scheduled task, you need to tell the automation which issue you want to create the sub-task(s) in.
Thanks, Martin. Very kind of you. Yea I've been reading about smart values in the documentation but I don't quite understand where do I actually set this {{createdIssue}}?
do I just put this in the Description? I tried other smart values on Additional fields and it didn't work and got more errors
No, you need to write it manually to the Parent issue field. Check the screenshot I attached
Hi @Ali Zalzar
If you don’t mind using a plugin, I believe that as an alternative to automation action, you could also use the Issue Templates for Jira app to automatically create tasks with sub-tasks out of predefined templates.
With our app, you can create a repository of re-usable templates and then use them in scheduled automation by defining a specific template in your rule as follows. Thanks to that, you won't need to define the template text in the automation rule directly, but in the template issue which could be more convenient in some cases.
{“properties”: [{“key”: “issue.templates.automation”,“value”: {“applyTemplate”: “TEMPLATE-1"}}]}
Feel free to ask here in case of any additional questions about the functionality or the required setup.
I’ll be happy to help!
Cheers,
Aleksandra
@Martin Bayer _MoroSystems_ s_r_o__thank you for this answer, but I'm getting the same error, and when I attempt to enter {{createdIssue}} in the parent-issue drop-down, it reverts to "Current Issue" (no more free-text entry).
Jira doesn't seem to like {{createdIssue}} or {{createdIssue.key}} in the additional field JSON.
Any pointers most appreciated - thank you.
It looks like you're new here. Sign in or register to get started.