Hi,
Create Multiple Sub Tasks, based on a field value, for example if UT-IssueCount is 3 , then we should create 3 Sub Tasks.
All during transitions from one stage to another.
Though, rule is working, but only once, no errors etc.
Have a look at the screen shot attached, for information.
Hi @Asheesh
What is the type of your field, UT-IssueCount? Is it a numeric field?
Please show an image of your advanced branch to provide context.
Until we see those...
There is no built-in branch type to iterate over a numeric value. Instead you may try a couple of possible workarounds:
Please note the first technique is limited to 100 items as that is the branching limit. The second technique might be limited to 10 items due to the service limit for recursive rules.
Kind regards,
Bill
Thanks a lot Bill, the data type is indeed numeric.
Let me try your suggestive rightPad function.
Meanwhile have a look at the attached screen shot.
Regards
Asheesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your screen images did not post, but they may not be needed. As your field is numeric please try the rightPad() technique and let me know how that helps. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bill,
Planning to remove this one & replace it another one.
Could you please advise the data type/field type to be used.
Regards
Asheesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please clarify what you mean by remove / replace.
The number field will work with the rightPad() technique to branch for a number of times: https://community.atlassian.com/t5/Automation-articles/Branching-over-smart-values-in-Jira-Automation/ba-p/1741935#M531
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill,
Looks I am confused with rightPad() function, could you please write syntax/use of rightPad() with Number data type.
{{issue.UT-IssueCount}} ........Numeric Variable
Regards
Asheesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your custom number field would substitute in the example I provided. And so the value of the varLoopValues variable would be:
{{varLoopValues.rightPad(varLoopValues.length.plus(issue."UT-IssueCount"), "X").remove("NULL").replaceAll("X","X,").substringBeforeLast(",")}}
Assuming that is the correct smart value for your field.
If that does not help, please pause to review the other post I linked to and check your rule steps. Then post an image of your complete rule and the audit log details for context.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Bill,
Getting errors, attached screen shots,
@https://community.atlassian.com/t5/Automation-articles/Branching-over-smart-values-in-Jira-Automation/ba-p/1741935/page/2#U2818662
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Asheesh -- I responded on the other thread as you are missing several steps to use the rule technique I described.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the advanced branch, it needs to split the values. Please see the original post for context.
Also as you create a rule, it can help to write values to the audit log to assess progress. I recommend adding the variable to the audit log immediately before the branch to confirm it contains what you expect:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Asheesh Welcome to the community!
You can use the IF Else condition
If count 1 then create 1 subtask
Else count 2 then create 2 subtasks
Else count 3 then create 3 subtasks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Manoj,
Looks there is some issue with current release of Jira Cloud, although I could add If-Else_Block, but while setting it up could not see an option to add else condition.
Could you please check.
Thanks
Asheesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please share the screenshot of IF block condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!
Join an Atlassian Community Event!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.