How to handle multiple actions from different field checks
Asked by David Quiram:

We are building a workflow that will need to execute a couple of different actions depending on different field checks.

As I understand it, you would use branching to achieve this but I can't seem to get it working.

For testing purposes, I was just trying to have the automation make two different comments on the triggering issue based on if two different fields had a specific entry. Here is screenshot of what I have.

![Screenshot 2022-02-18 104941.png](/t5/image/serverpage/image-id/184250i576F46B49608B12D/image-size/large?v=v2&px=999 "Screenshot 2022-02-18 104941.png")

The final automation will be creating linked issues in different projects based on those same two fields, but this was built to see if the branching was working in the way I assumed it would work.

Am I using the wrong branching or would I have to do this in a different fashion?


Answers:
author: David Quiram
body: So the suggestions in this thread were not working as intended and I ended up having to go to Atlassian Support to figure out why. To be clear, the suggestions given before **would** work, if we were not using Forms.

We are using the new Form feature to gather data on our customer portal. The automation happens so fast that Jira doesn't have enough time to put the data from the Form into it's linked Jira Fields.

We had to put in several (6) Re-Fetch data actions at the start of the automation in order to give Jira enough time to put the data into the Jira Fields. After that, the automation suggestions worked as intended. We ended up using the Branching option as it was better for grouping for us and makes the flow easier to adjust later.

![Screenshot 2022-02-22 105156.png](https://community.atlassian.com/t5/image/serverpage/image-id/184817i53C76BA752FB18ED/image-size/large?v=v2&px=999 "Screenshot 2022-02-22 105156.png")


author: Stefan Salzl
body: Hi [@David Quiram](/t5/user/viewprofilepage/user-id/4501008) ,

++**Requirements for automation**++

It would be good to formulate the way of the automation/the purpose as functional and highlevel as possible. That is the starting point to decide which way would fit best.

One way to do this is "given - when - then" method. This splits it up in the trigger, conditions and actions.

* When should the rule run? What is the exact entry point/event?
* Which are the conditions that describe the circumstances as detailed as possible that needs to be fullfilled to process the exepcted actions? (conditions) --\> the better these are known/specified the more precise the rule can be shaped and avoids failure
* what exactly is the expected result?

some insights that came to my mind regarding your example rule:

**++first condition - issue check++**

It?s good to check condition as early as possible to avoid further processing. There is a condition to check field conditions. Issue type can be checked there too which is more performant than a JQL.

**++branching++**

As a special issue triggered this rule and there hasn?t been any other action in between the "current issue" is automatically the issue you created. You could have done the same actions without the branches.

Please let me know if there are further questions where I can support you.

Best  
Stefan

comments: author: David Quiram
body: I need an automation that will execute two actions based on separate conditionals.

When box 1 is checked, take action A

When box 2 is checked, take action B

These requests will very likely have both boxes checked, so it will need to perform both actions, but that is not always the case so they need to be able to execute independently.


author: Stefan Salzl
body: From how I interpret your description the a setting similar to following rule should meet your requirements (see screenshot)

I tested on my site:

* if both fields are empty --\> nothing is processed
* if assignee has value, Story points is empty --\> only action for first "if" is processed
* if assignee is empty, Story points has value --\> first action is not processed, only action of 2nd if is processed
* if both, assignee AND Story points have value --\> BOTH actions will be processed

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/184266i74C50A14C9D54A0A/image-size/large?v=v2&px=999 "image.png")

Hope this helps.

Best  
Stefan


author: David Quiram
body: I didn't realize you could do multiple IF statements. I will give that a try next.


author: Adrien Low _ServiceRocket_
body: Hello [@David Quiram](/t5/user/viewprofilepage/user-id/4501008) ,

Based on your requirements, it seems that you are looking for the **If / else block**condition.

A sample configuration as below:-

![Screenshot 2022-02-19 014344.png](https://community.atlassian.com/t5/image/serverpage/image-id/184259iABE9F7AF9F1C2012/image-size/large?v=v2&px=999 "Screenshot 2022-02-19 014344.png")

Hope this helps.

Regards.

comments: author: David Quiram
body: It was my understanding that if the issue matched the first IF condition, then it would follow that path, make the comment, and then exit the automation. Is that not correct?  

Given your example, what if the user selected Apple AND Banana?


Tags: cloud