Hi All,
Is there a way to use JIRA automation to create multiple JIRA issues based on items checked off on a checkboxes custom field?
ie) Task-Checkbox (custom field)
☑ Task 1
☐ Task 2
☑ Task 3
☐ Task 4
In the above example, I need to use automation to create 2 JIRA tasks. One for Task 1 and one for Task 3. Is this possible?
I'd like to create the JIRA issues upon the checkboxes custom field being updated or created for the first time. Thanks!
I was able to get my JIRA Automation to work, but there is a scenario that causes errors.
Here is the logic at a high-level:
I use Advanced Branching to iterate through the Checkbox list of items and create a new JIRA Task for each item that is checked.
The problem is when I go back to the checkbox and check off another item. The JIRA automation will create the new Task but also create tasks for the items already checked.
ie) Marketing Activities (Checkbox custom field)
☑ Task 1
☐ Task 2
☑ Task 3
☐ Task 4
The first time the automation runs, it creates JIRA Tasks for Task 1 and Task 3.
Now I check Task 4 so the following are now checked:
Marketing Activities (Checkbox custom field)
☑ Task 1
☐ Task 2
☑ Task 3
☑ Task 4
I want the JIRA automation to create a new JIRA Task for only Task 4, but instead 3 new JIRA Tasks are created (Task 1, Task 3 and Task 4).
Any way to get around the duplication of Tasks in this scenario? Thanks!
Hi @Randy Elias
A couple of things to try to prevent the duplication are the use of the change log (i.e., fieldChange) or condition checks:
Try using the Change log
The {{fieldChange}} smart value has some extra attributes which might detect the added / removed values from the checkbox, as the selected values are essentially a list: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--fieldChange--
Unfortunately there are known problems with the accuracy of the fieldChange smart value for some list fields. I recommend testing this first: create a test rule, triggered on changes to your field, and write the smart value for the changed values to the audit log. If it works as expected then use those to decide which tasks to create.
If that does not work...
Try using Conditions
When changing the checkbox field, the rule could trigger several times in rapid succession, as values are added / removed. And rule branches which could be on more than one thing are executed in parallel and asynchronously, with no guarantee of when the branch will finish...up until the last step of the rule.
Those two things together could definitely create timing errors in your rule, leading to problems with both the creation and detection of issues. You could try to remove the branch and try this:
This is a much slower (and longer) rule, but the slow downs may help to prevent the duplication.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Bill Sheboy
I've almost got this working using your algorithm.
Do you know how I can reference each item in the Checkbox array?
I was thinking the syntax would be something like:
{{issue.Marketing Activities[i].value}} where i = 0 to 3 in my example above.
But this doesn't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nevermind. That syntax is:
{{issue.Marketing Activities.get(0).value}} for the first item.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy - Thanks again! I got the automation working correctly using your "Conditions" algorithm.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Randy Elias
Welcome to the Community!
The answer to your question heavily depends on what Checklist app you have installed in your Jira.
Checklists are not supported in Jira natively, so I'm guessing you have to be using one of the checklist apps available on the Marketplace.
Let me know which one is it and I'll try to guide you in the right direction.
Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the prompt response @Wojciech Wardaszko [HeroCoders] !
Actually, I should have titled the post "Create Issues from Checkbox using JIRA Automation".
I believe I'm using the native "Checkboxes" custom field type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, I get it now.
As a worker of a company that made checklist apps I immediately jumped to conclusions, my bad. I think @Bill Sheboy answers will put you on the right track if you want to stick to just custom fields.
Having said that, I do strongly recommend using our Issue Checklist Free for this - it usually brings a lot of value to cases where there are things to marked as done and processed.
It comes with a built-in feature to convert an item to a task ;)
It's also possible to use our app with automation rules and the possibilities are nearly endless.
Let me know if you'd like to know more :)
Cheers,
Wojciech
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.