Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to handle multiple actions from different field checks

David Quiram February 18, 2022

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

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?

3 answers

1 accepted

0 votes
Answer accepted
David Quiram February 22, 2022

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

0 votes
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 18, 2022

Hi @David Quiram ,

 

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

David Quiram February 18, 2022

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. 

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 18, 2022

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

 

Hope this helps.

Best
Stefan

Like David Quiram likes this
David Quiram February 18, 2022

I didn't realize you could do multiple IF statements. I will give that a try next. 

Like Stefan Salzl likes this
0 votes
Adrien Low _ServiceRocket_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2022

Hello @David Quiram ,

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

Hope this helps.

Regards.

David Quiram February 18, 2022

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? 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events