I am using this kb
https://confluence.atlassian.com/jirakb/create-multiple-jira-issues-based-on-a-custom-number-field-using-automation-1409089809.html
Some answers from the community that are accepted like
https://community.atlassian.com/t5/Jira-questions/Re-how-to-use-jira-automation-to-create-multiple-issues/qaq-p/2443304/comment-id/696566#M696566
https://community.atlassian.com/t5/Automation-articles/Branching-over-smart-values-in-Jira-Automation/bc-p/1921481#M546
https://community.atlassian.com/t5/Jira-questions/Re-Re-Jira-automation-for-creating-tasks/qaq-p/2198336/comment-id/557814#M557814
For some reason I dont understand my rule creates only one task.
Can @Bill Sheboy jump here? please?
My issue view - "Teste automacao" is my number field. I also tried to do just with the variable created by the manual automation menu, no success too
Could you post your automation here? That way we can troubleshoot what is missing.
Hi @Patricia Francezi_iDev_ , thanks for your question. I am doing something similar for a JSM project.
The Request Type is for a new employee onboarding. Then, I am branching on the smart value of the custom field, which in this case is a tick box custom field. So, when they indicate in the onboarding ticket that they need a number of items for the new resource, I am creating a sub-task for each one.
Basically, I think the branch is the key but if you share your rule, as @Shawn Doyle - ReleaseTEAM suggests, we can take a closer look.
Good luck!
Its updated, please check
@Valerie Knapp Thanks to jump in - my post was updated. I saw no difference from the posts I used to build it.
so, looks like it enters the branch, however does not loop.
Can you post the value of the field you are using as the loop var?
Also, please paste the full string you have in the Create Variable boxes, the second one is truncated.
My thought is either the field isn't been seen as multiple values or the way you are parsing the field isn't creating multiple values.
{{varLoopValues.rightPad(varLoopValues.length.plus(issue."Teste automacao"), "X").remove("NULL").replaceAll("X","X,").substringBeforeLast(",")}}
Teste automacao - in the right of the screen shot
Hi @Patricia Francezi_iDev_
You appear to be following the technique I wrote a while ago...which replaces the value of a created variable, but your variable names are not identical: one is varloopValues and the other is varLoopValues.
Smart values are name, spacing, and case-sensitive. When an incorrect / unknown smart value is used, it is replaced by null, leading to unexpected results or errors.
Please try updating the capitalization of your variable names so they match and then re-test.
Next, did you confirm the smart value for your custom field, {{issue."Teste automacao"}}? You could write that value to the audit log to confirm it is correct. As noted earlier, if an incorrect smart value is used, it is null. You may find the correct smart value using this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Finally, and just to confirm, what is the type of your field driving the loop: {{issue."Teste automacao"}}? If it is not a number field, it will need to be converted using asNumber.
Kind regards,Bill
checking
and its a field number, yes.
i was trying to use the variable from the automation manual menu, so changed to a field, wondering if the variable is a number or not.
but the field is a number
{ "id": "customfield_11772", "key": "customfield_11772", "name": "Teste automacao", "untranslatedName": "Teste automacao", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[11772]", "Teste automacao", "Teste automacao[Number]" ], "schema": { "type": "number", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:float", "customId": 11772 }
That appears to be a number field.
Please add writes to the audit log after each Create Variable action to check if the value contains what is expected.
If the second variable created is incorrect, the symptom I would expect is only one loop of the branch, which is what appears to be happening.
after changing the variable names to be the same - it didnt work, but when i changed the issue field to
issue.customfield_11772
it worked . THAAAAAAAAANK YOU!
BUT dont leave me @Bill Sheboy LOL
If I want to add the numbers in the summary or doing any calculation with then (like now + 3 months ahead)
Cause one task will have a due date per month based on the number
Like 8 months - 12, depends ....
Do you have any magic to share with me?
It looks like you're new here. Sign in or register to get started.