Automation rule for checkboxes

Katie B
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!
February 29, 2024

Hi, I have a checkbox field in the task issue for departments " HR, Finance, legal."

Initially when the ticket is created the user does not have to pick a department. If a second checkbox is checked I want to automatically create a new cloned task, likewise if the third checkbox is clicked, a third clone is created. 

 

The current method ive tried creates a clone every time I click or unclick the checkboxes.  I would also like the user to change the epic when the clone is created. 

 

Slide2.JPG

1 answer

1 accepted

1 vote
Answer accepted
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 29, 2024

Hello @Katie B  Welcome.

 

What is the field name of the multicheckbox field and how many checkboxes do you have (just curious)? 

Imaging your check box field is called, "My Departments"

Right after your trigger, log below 2 smart values as shown below and share your screenshot of the log:

{{My Departments}}

{{My Departments.value}}

Please pay attention to spaces to the field name if you have any. If you dont, its well, great.

Because if {{My Departments.value}} gives you a value, you can check and create clone task if needed or not.

 

At this point, dont bother with the branch as of yet, eventually we will put an if statement before your branch so we can only clone when needed.

 

So delete your branch step, log values like below and share your screenshot of audit log..

 

 

image.png

 

Katie B
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!
March 1, 2024

Hi, I have 8 checkboxes for my field "Book" aka "Departments ."

I logged in the 2 smart values, as shown in the screenshotimage1.png

Thank you for your assistance. 

Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2024

Hello @Katie B 

{{changelog.book.toString}} - This will give me updated list of checkbox values.

{{changelog.book.fromString}} - This gives me previously selected list of checkbox values.

Using those 2, we can determine if a checkbox was newly selected.

 

I am first going to give you a sample rule. 

Our rule, whenever this "Book" field is changed, we will check if say, "Finance" was added newly and it did not exist previously,  if so, we will create a task in the "Cloned" issue. else it does not nothing.

To do this, after your trigger, you select "New Condition" -> "If/Else Block" -> Add Conditions -> Advanced Compare Condition, and then we check if {{changelog.book.toString}} contains "Finance" and {{changelog.book.fromString}} "does not contain" Finance.  (see screenshot below)

You can keep adding Else If Conditions the same way to check for Legal, HR etc.

So this logic, checks for a specific value selected and ensures it was infact the value which was changed and if so, it does something.

So above logic is good.

Now, I wanted to ask the second half, what did you want to do next. I see you are  trying to clone trigger issue as a task to linked issue which is also a clone? I also see you mention about changing Epic link of the newly created issue.

So yeah, please share the details about the new task which needs to be created.

Should it be a clone of "trigger issue" where Finance was selected? What should the epic link etc, so we can set you up.

 

BTW, for reference for forward, please select Audit Log (highllighted yellow in below screenshot) and expand "show more" section if something does not work so we know what maybe the issue and can help you faster.

 

image.png

 

Suggest an answer

Log in or Sign up to answer