I am using this kb
Some answers from the community that are accepted like
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
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 }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, done; making progress!
Regarding using the number, do you mean of the counter for looping? If so, I updated that technique later to do so, as described in this post:
And remember such branching occurs in parallel; that means the issues will be created in a random order, not in the sequence of the counter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Patricia Francezi , 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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Valerie Knapp Thanks to jump in - my post was updated. I saw no difference from the posts I used to build it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you post your automation here? That way we can troubleshoot what is missing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Its updated, please check
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{{varLoopValues.rightPad(varLoopValues.length.plus(issue."Teste automacao"), "X").remove("NULL").replaceAll("X","X,").substringBeforeLast(",")}}
Can you post the value of the field you are using as the loop var?
Teste automacao - in the right of the screen shot
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like Bill found the issue with the different variable names with the lower vs uppercase L.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it was also the "smart value" - it was not working. so I changed to customfield id.
Anyway THANKS TO JUMP IN!!!!
I want also contribution on this if possible
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 ....
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.