Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation Dependent on Number of Request Participants

Alan Woodall
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 11, 2022

Hello,

What I am trying to do is set up automation to do an action on an issue if and only if the reporter and each and every request participant have emails in a specific domain. What I am wanting to do is compare these smart values to exactly match a regex to verify their email address:

{{issue.reporter.emailAddress}}

{{issue.Request Participants.get(0).emailAddress}} and then iterating through the request participant list to get(1), get(2), etc depending on the number of request participants.

 

The problem is I'm struggling to structure the automation rule based on how many request participants are on an issue. For instance, If I just use the two smart values above to compare values in my automation, my rule doesn't do what I want to if there are more than one request participants on the issue (2nd, 3rd, 4th request participants don't get verified).



The solution I've come up with is creating a ton of similar automation rules. One rule that only validates the reporter and verifies that there are no request participants. Another separate rule that verifies there's only one request participant. Another separate rule that verifies there's only two request participants. Realistically, we probably wont get an issue with more than 10 request participants that we'd want to run this rule on. But that is still 11 separate automation rules. Surely there is a simpler way to structure this, and a way that will work even if we happen to have 100 request participants on an issue.

 

I don't think advanced branching will work since it processes a separate action for each individual request participant that passes validation, when I only want the action to run once if and only if every single request participant passes validation.

 

I'm thinking this may be something I'll need to learn how to use something like Scriptrunner, which I haven't used yet.

 

Thank you,

0 answers

Suggest an answer

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

Atlassian Community Events