Hi,
I'm trying to create a Jira Automation rule where creating a task with a specific keyword automatically creates several subtasks with predefined settings.
For example:
I create a task with the summary:
Create Badge for Staff Party
Let's call this the Trigger Task.
Since the summary contains the word "Badge", I want the automation to:
For Sub-task B, I want the Original Estimate to depend on the Trigger Task's summary:
Rovo (the AI assistant) suggested using the following formula directly in the Original Estimate field:
{{#if(issue.summary.matches("(?i).*(Party|Parties).*"))}}8h{{#elseif(issue.summary.matches("(?i).*(Festival).*"))}}16h{{#else}}10h{{/if}}However, the automation fails when it reaches that action.
Is this type of conditional expression supported in the Original Estimate field? If not, what would be the recommended approach to achieve this without creating multiple separate automation branches?
Thanks in advance!
Hello @Karmandroid Singularity
One extra detail to last answer. Value depends on the original trigger task summary, also make sure you reference the trigger issue, not the newly created sub-task.
Like that: {{if(triggerIssue.summary.contains("Party"), "8h", if(triggerIssue.summary.contains("Festival"), "16h", "10h"))}}
Also don´t forget field must be added to relevant Sub-task field creation screen.
Best,
Arek🤠
Rovo was giving the Java formated code which is not supported by the automation. Back to the automation setup:
The rest continues as described from your issue. Since you have the fixed Summaries for both sub-tasks, depending how your triggering issue is, it will only change based on it. If you do manual change, the automation won't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The original estimate field does not supoort if/elseif/esle smart value blocks directly so that expression will fail.
try
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bear in mind that this only needs to happen for the Sub-task B.
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.