Hello there 👋🏼,
So I have a trigger when the PR is merged!
Then I check the type of ticket and current status to see if I can transition it (we have a guided workflow).
When I enter the Else-if part, and if the issue has no subtasks, the condition fails and then doesn't make the transition. And as we can't set an if-else inside an other if-else, then I would like to know the solution to have in the For Current Issue the possibility to check if NO subtasks or ALL DONE
For now I have these 2 separated blocks of FOR CURRENT ISSUE that I would like to merge in 1.
Thank you :)
Hi @Julien Goudeaux and welcome to the community,
Your rule shows 2 branches within the same "decision" path. The 2nd branch could never be reached as the rule will break as soon as the condition of the first branch don´t match. That´s what an if-else-clause is for:
referring to your rule this could look like similar to this (don´t have the same workflow so status has to be editted to yours):
Best
Stefan
Thank you for the answer @Stefan Salzl !
Yeah it will work this way but I wanted to avoid duplicating stuff!
This is why I was asking if it was possible to have an only one IF where I can say AND and OR like :
- status = something
AND
- TestRoom = Something
AND
- subtasks ALL = something OR No subtasks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Those are basically contrary concept:
AND - all of the conditions met and resulting in one action
OR - at least one of the condition matches and has a dedicated result
IF/ELSE - either one or the other condition matches and a dedicated result regarding which of the conditions matched
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry @Stefan Salzl maybe I'm not asking it correctly and it's not clear enough!
I'm an iOS developer (while I'm scrum master of my squad)!
So I know the IF/ELSE - AND - OR concepts!
What I see is that the If/else block is either a success (all conditions succeed) or a fail (at least one has failed)!
But what I wanted to do (if it's possible) would be something similar to:
If status = "Code Review" AND TestRoom is Empty AND (subtasks match status = Done OR subtasks not present)
Then transition to Testing
Else If status = "Code Review" AND TestRoom = "Not Needed" AND (subtasks match status = Done OR subtasks not present)
Then transition to To Deploy
This is the tricky part in the parenthesis of my Else If that would allow me to have 2 big conditions (If/else) instead of 4 to test one time with subtasks done and an other time with no subtasks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok. I see :) not everybody in hear is a developer and knows about the differences. In this case my explanation was unnecessary.
The point is that the part in the paranthesis checks 2 different „entities“: once presence of subtasks vs. status of subtasks (even further entities that depend on each other which even consits of another „if“ - the second „if“ (status) can only be checked if first condotion doesn‘t match). Within jira I see the OR realized in consition „is one of“ which will only take 1 input (eg. status is one of ...). As far as I know by chaining 2 different entities (especially checking 2 different combinations) this won‘t fit in an OR clause (at least not in A4J).
What would be the differene in your test? From my point of view the result of the automation rule is tested. As the use case doesn‘t change the testcases would stay the same. Only the „how it‘s implemented“ changes.
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.