Has anyone come up with a way to have "subroutines" or "modules" in Jira Automation Rules?

Cash Coyne
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.
May 23, 2024

I have two situations that I've done a workaround for in Rules automation and want to see if anyone has a better solution.

  1. You're limited to 65 steps in an automation rule.  In this case, I have created a custom field like "Action1_flag".  Then, when I have used up most of my 65 steps, I set the Action1_flag field to 1 as the last thing I do in the rule.  Then I have another rule called Action1 and it is run when the Action1_Flag field is modified. In that rule, I check and see if the Action1_Flag is set to 1 and if it is, I set it to 0 and then I perform the remainder of the steps that I didn't have room for in the initial rule where I set the Action1_Flag
  2. Sometimes I have steps that need to be done by multiple rules.  An example are some complex calculations or something with a lot of steps and I don't want to have to repeat this in every rule where I need it as they may change and then I'd have to make the changes in all the rules. In this case, I do the same type of thing as described above.  When I get to the point in the rule where I need those steps taken, I set a flag, maybe Action2_Flag in this case, and then the Action2 rule performs those steps.  It's not exactly a subroutine as it doesn't return control, but it gets the job done.

Any thought on how to do this better or differently?

1 answer

1 vote
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2024

Hi @Cash Coyne - Based upon what you're sharing about exceeding the number of components, you're taking a popular approach. However, it would be helpful to understand the problem the rules are trying to solve.  There may be opportunity to reduce the number of components and improve efficiency.

Cash Coyne
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.
May 23, 2024

I've re-worked it a number of times and is about as tight as it can get.  One problem is that while there is an If-Then-Else construct in automation, you can't come back to the original workflow and that requires a lot of redundancy.

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 29, 2024

I've found that I can oftentimes replace complex if/else conditions with a combination of lookup tables and advanced branching.  If you're interested, please share the business logic that is driving your if/else branching.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events