I have an onboarding form nested in my "onboarding" request type. Within this form is an "IT Equipment" checkbox field that includes various options for equipment such as PC, Laptop, etc. What I would like to happen is when any of the boxes are checked, once the form is submitted, it fires an email to my IT manager notifying them of equipment requested. I've tried multiple routes to complete this, but the form audit always returns a "nothing to trigger" entry.
How do I build this rule out properly?
After great responses here and some playing around, I finally found the combination that works for my needs. This was the key!!!
Fields in forms can be called in a smart variable.
{{issue.forms.<Form ID>.itequip}}
I hope this helps!šš»
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The result is different, but still not recognizing those checked boxes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Form answers from checkboxes comes back as an array, so your condition in the if component should use the contains instead of equal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See, I tried that because the audit was stating:
Condition not passed for
[1 ,3 ,6]
equals
[1], [2], [3], [4], [5], [6], [7]
So I changed it from "equals" to "contains [1], [2], [3], [4], [5], [6], [7]"
Is my formatting incorrect for the possible array?
What is the proper format if I want it to be any combination of 1-7?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Chad Henderson,
Welcome to Atlassian Community!
When you have an automation question it is always better to include a screenshot if the automation and the audit log so that we can see what you have tried so far. Without that information I can only give you a generic answer.
This should be easy to do if you trigger your automation on form submitted, as long as you have given the field in question a field key. Then you can access what the user selected using ((issue.forms.selectField.value}} and then send an email if the selected option is what should trigger the email.
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 form field:
Here are the audit logs... The first log is without checking any boxes, the second is with boxes checked.
And here is the automation rule that is active:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...to the suggestions from @Mikael Sandberg
I see two things to change in your rule before you continue testing, and they may help address this symptom.
First, the Work Item Created trigger has known racetrack timing problems. That is, the rule can start running before all of the data is available. The mitigation for this problem is to always add the Re-fetch Work Item Data action immediately after this trigger. That will slow the rule slightly, reloading the data before the steps proceed.
Next, I recommend never using conditions directly on triggers, particularly with ones such as Work Item Created. There are several defects with this new-ish feature, including related to the racetrack timing problem noted above. (i.e., if the data is not ready yet, the conditions will non-deterministically succeed or fail) The mitigation for these defects is to add separate conditions after the re-fetch action.
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.
Okay, so based on the audit log it could be that your work item is not complete when the work item is created. You could either add a delay or change the automation to trigger on when the form is submitted and check the form answer instead by giving the field a key in the form (select the field and then scroll down to the bottom to see it).
When you trigger on form submitted it enables the {{forms}} smart value so you can access the fields using the field key. Check out this KB for more information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See, I tried that because the audit was stating:
Condition not passed for
[1 ,3 ,6]
equals
[1], [2], [3], [4], [5], [6], [7]
So I changed it from "equals" to "contains [1], [2], [3], [4], [5], [6], [7]"
Is my formatting incorrect for the possible array?
What is the proper format if I want it to be any combination of 1-7?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I assume you are using a form from on the space setting in you JSM.
You don't store this form checkbox field in a Jira field, but its just there on the form.
Then see this article on how to get this information based on smart values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Based on my current rule, does this replace the "Then" component?
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.