It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can Jira select a random sample of issues for QA? Edited

Hi all,

I'm looking to implement some sort of random processing within Jira. Only 25% of a specific sub-task needs to go through QA, so does anyone know of a way to do one of the following:

  • Out of a list of jql-filtered issues, give a random 25% of these the value of 'Needs QA' (in a custom field), OR
  • Having a side-step status in a workflow of 'QA Pending', that only a random 25% of the filtered issues will transition through, and the other 75% of sub-tasks will bypass this status

Any ideas would be much appreciated!

1 answer

1 accepted

0 votes
Answer accepted

@Callum Carlile ,

You can use Automation for Jira (which is standard in Cloud). You should be able to make a rule that selects a random number and multiply that with the number of issues within your query.

See the Random function here.

So you could make a custom field that sets a field (checkbox) in 25% of the time during a certain transition/creation of a subtask.

If you need help, just say the word, I'll try to figure something out if I have time.

Thanks @Rudy Holtkamp _ TMC _ , this sounds exactly what I'm looking for! I'll have a play around with this and let you know if I have any questions.

Here is the rule, at least the logic to get the 25%





@Rudy Holtkamp _ TMC _ I'm not entirely sure where I would enter this smart value, where I'd select the 0.25 (25%) value and what field to edit, would this all be done within a rule action?

What you do is,

1. Select a trigger (green block in the picture above): e.g. issue transition to a certain status

2. create a condition (yellow block in the picture above) and choose advanced compare condition. I used the smart values to get randomly a number between 1 and 4. And if the value is greater than 3

3. Then you can add an edit issue (blue block) and set the 'select this item for QA'-field (or whatever you've called it).

Afterwards you can easily use JQL to get all issues where that field is set.

@Rudy Holtkamp _ TMC _ Thank you very much for this information.

By default, most of the issues need to go through QA (so the "QA Required?" field will have a default value of Yes). However for some of the isssues (e.g. of a particular issue type) they do not need to be QA'd, so the value can be set to No. Do you think that the following rule therefore work for this?

(where the 'less than 4' refers to the 75% of issues which do not need to go through QA, and the action is setting the "QA Required?" field to No)

example rule.PNG

Like Rudy Holtkamp _ TMC _ likes this

Also with the {{#=}}ROUND(RANDOM()*4,0{{/}} condition, will 0 ever be added as a value? If so, there would be 5 numbers, would this need to be changed to {{#=}}ROUND(RANDOM()*4,1{{/}} to make it 75% and not 80%?

Yes, my logic is flaw.

Better to use  {{#=}}CEILING(RANDOM()*4){{/}}.

Now everything between 0..1 wil be 1, between 1..2 will be 2, etc.

I think, with the above improved logic, your rule will work.

All seems to be working fine! Thank you very much for your help @Rudy Holtkamp _ TMC _ !

Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Published in Jira Service Desk

[New Resource] The Complete Guide to Atlassian for ITSM

Hi Atlassian Community! This is Teresa from the Atlassian team. My colleague Paul Buffington @Buff and I are excited to share a brand new ITSM resource we’ve created – "The Complete Guide to A...

348 views 4 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you