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:
Any ideas would be much appreciated!
@Callum Carlile _Automation Consultants_ ,
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 , 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the rule, at least the logic to get the 25%
{{#=}}ROUND(RANDOM()*4,0){{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Rudy Holtkamp 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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Rudy Holtkamp 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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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%?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think, with the above improved logic, your rule will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All seems to be working fine! Thank you very much for your help @Rudy Holtkamp !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there. Automation beginner here. I'm attempting to do exactly this- in my case, with a 10% sample. I want it to add a new label to the selected issues, so I can then filter these issues onto a new board for review. Is there any reason this rule below isn't working? Apologies if I've misunderstood something here, I'm pretty much just copy and pasting the above with altered thresholds. I've also set this to manually trigger- am I assuming right that if I manually trigger this from a single issue, the rule will still run across the entire issue base, not just on that one single issue? Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @ed_corke ,
Sorry to be late to your party... I missed it due to vacation.
First of all if you use the random function in two different actions, you will end up having two different random numbers. Which means the number you are logging is not the number you are comparing to. If you want to have only one random number, you should use the 'Create variable' action. Call it {{random number}} and use that to log an compare. Which might already solve your problem.
Furthermore I can't see what could be wrong.
Might be the edit labels part, but there are no details shown.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Rudy Holtkamp I'm having the same issue.
I want to generate a random sample of tickets based on a JQL. The sample is 5% of the tickets captured.
Tried to run the rule with either Ceiling or Round and the issue itself is that since the numbers are being thrown at random. The numbers themselves repeat before all avail numbers are used
Meaning, you can have the number '4' listed three times before the list of numbers available is finished. Meaning that even tho the selection is being made at random the sample taken is not equivalent to a 5%
See below:
Do you have any suggestions on how to make the rule finish the numbers available selection before repeating numbers again?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mario ,
Interesting problem again.
So what you want is 5% of your selected issues to be marked with a certain label. That is not quite possible. But what you can do is to label an issue with a 5% chance, which should be more or less the same if your selection is large enough. E.g. if you have 20 issues in your selection, the chance to not exactly select 5% is higher than when you have 2000 issues in your selection.
What you need to do is the following:
This should 'select' an issue in 5% of the cases.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Привет, мне нужно, чтобы каждый понедельник создавалась задача, в которой в описании или связанной (связь установить не удалось) будет 5 задач, выполненных за прошлую неделю с пн по вс. Пока что мне удалось сделать все, что нужно, кроме случайного выбора 5% задач из всегда разного числа. Может быть, вы знаете, как это сделать? Буду очень благодарен за помощь. Также я не могу найти значение, которое бы оставляло список этих 5% задач в описании новой задачи
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Callum Carlile _Automation Consultants_ & @Rudy Holtkamp ! Does the automation rule guarantee 10% sample size if I put ceiling random 10 and compare it to if number is equal to 1.
Out of 100 tickets, will I get exactly 10 tickets in QA? I have already done this, but I can't figure out how to get a fixed % of the total population as sample. I have 100 tickets, I need exactly 10% for QA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Manav Shah ,
No, with the above logic you will not get 10% of the tickets guaranteed. (Well in the example above it was 5%, but in your example you talk about 10%).
In reality the Random function be regenerated a new number every time, so this could lead to 0% hits and 100% hits, although in most cases it will be around the 10%.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.