How do I make the if condition attached into an else condition under the same branch?
You cannot add IF/ELSE condition within a branch, at least not yet. What type of branch are you using?
Hi @Timi Falusi
Yes, and...to the suggestion from @Mikael Sandberg
As Mikael noted, an if / else condition cannot be used inside of a branch (although the opposite is possible).
Perhaps if you describe the problem your rule is solving (i.e., why do this) and post an image of your complete rule, that will help the community offer better suggestions including alternative rule structures. Thanks!
Kind regards,Bill
Hello @Timi Falusi
Welcome to the Atlassian community.
Please provide a screen image that shows your entire rule so we have appropriate context for your question.
Also explain to us what you are trying to accomplish with the rule.
Is the image you showed us nested under a For Each branch? i.e.
@Mikael Sandberg is correct that if you have a rule structured as above you cannot incorporate an If/Else block within a branch. But if you are not actually in a For Each branch, then to add and If/Else block to the rule you need to select that option when you are adding your condition.
You can't add an Else when you have selected a simple If condition.
After selecting an IF or ELSE condition then you will see that there is a button for adding the Else.
This is what I have in full. I want it to add labels OT and US if a ticket is created between 17:00 and 22:00 UTC, else add labels OT and APAC if a ticket is created between 22:00 UTC and 8:00 UTC
Thanks for those images and the explanation of the rule.
As you are running this daily with JQL to find work items created within specific time ranges, you could use a couple of alternative approaches:
The first approach is simpler and less likely to have errors halt the rule.
I have a couple of follow-up questions:
Why are you using the work item search endpoint with Send Web Request rather than the Lookup Work Items action and a basic JQL branch and then performing a work item edit? For the edit, is it just to suppress any notifications?
And, given the limitations of automation rules and the REST API endpoints, your rule can only process a limited number of work items. Will the JQL you are using ever return more work items than the service limits? https://support.atlassian.com/cloud-automation/docs/automation-service-limits/
It looks like you're new here. Sign in or register to get started.