Forums

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

Can someone help fix an automation rule I am using for QA Sampling?

William Wightman June 6, 2023

Hello,

I am currently setting up an automation rule so that we can pull 10% of completed issues for a QA check.

I referenced the following community thread to start building: 

https://community.atlassian.com/t5/Jira-Service-Management/Can-Jira-select-a-random-sample-of-issues-for-QA/qaq-p/1419911

The rules seems to be working but is not fully correct. 

QA1.PNG

 

The random value is correctly adding to the audit log. 

 

QA2.PNG

 

However, the compare condition doesn't seem like it is comparing to that initial random number that was generated in the audit log. I believe it is creating another random number and then editing the field based on that value.

Can anyone help me so that the compare value is looking at the actual number that was added to the audit log?

 

I am also open if anyone has any other suggestions on how to execute this. It would be ideal if there was something we could do to get exactly 10%. For instance the audit log adds a value in order from 1 to 10 instead of a random number.

 

Thanks for taking a look!

1 answer

0 votes
Trudy Claspill
Community Champion
June 6, 2023

Hello @William Wightman 

You are encountering the same problem from the source post mentioned by ed_corke on Aug. 9, 2021 and answered by Rudy Holtkamp on Sept. 6, 2021.

You have used the RANDOM function in two different steps. The use of the RANDOM function in the Condition is generating a new random number rather than using the random number you got in the previous step.

I believe you need to actually need to create a variable and use the RANDOM function in setting that variable. Then you will need to use the variable anywhere that you need to use the random number.

When creating a variable the value assigned to it will be considered a string, even if it is a number. So when you want to use it as a number you need to convert it; i.e. {{variableName.asNumber}}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events