In Jira service management, I have a couple forms created for managers to fill out when an employee or contractor are onboarding, and each created a ticket of either the employee-onboarding or contractor-onboarding type.
In the forms are checkboxes that can be selected to trigger an automation that create a subtask to create an account in one of our systems. There are a couple systems where we always create an account for employees but only sometimes create an account for contractors (e.g. company email account). Due to this difference there are two different kinds of checkbox fields, called required-accounts and required-accounts-contractor.
Is there a way to make it so an automation that creates a subtask to create an account in our password manager triggers if a ticket of the employee-onboarding type is created and in the required-accounts field the checkbox for the password manager is selected OR if a ticket of the contractor-onboarding type is created and in the required-accounts-contractor field the checkbox for the password manager is selected? These two events would have the same outcome.
If only the ticket type was different this would be simple, but since the employee and contractor required accounts fields are different I'm running into trouble trying to figure this out. I would prefer to not have to create a separate automation if possible.
@Ada , welcome to the Atlassian Community!
You can use a JQL condition for this case, try something like:
JQL: "customfield A" is not EMPTY OR "customfield B" is not EMPTY
So Jira will read if any of the two fields are filled in the ticket and will work normally without having to split it into 2 automations.
Try this and see if the result looks good to you.
This is probably the way to do it, but I don't see how to do this if a certain value in a set checkbox list is checked. For example,I need it to trigger if Required Accounts or Required Accounts - Contractor contains i.e. LastPass, so I tried
"Required Accounts" ~ "LastPass" OR "Required Accounts - Contractor" ~ "LastPass"
using ~ for contains per the JQL operators doc, but it returns
Invalid JQL: The operator '~' is not supported by the 'Required Accounts' field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are using "Required Accounts - Contractor", but Jira is reporting that the "Required Accounts" field is the one experiencing problems.
Can you confirm what the correct field name is? Also, is it a select list or single text field?
This will help to better identify the cause and help you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is just only showing the first error; if I remove the content before the OR it will give the same error but with the other field.
The field names are correct. It is a checkbox field with multiple options.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The JQL for checkbox fields are:
"Required Accounts - Contractor" = "LastPass"
You are using > Required Accounts - Contractor" ~ "LastPass"
Understand the difference of ~/=
I think the problem may be there.
I would recommend that you first assemble this JQL using the "Search issues" feature in Jira. When you get results from issues, then just use the same JQL in automation and it will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The checkboxes each trigger their own automation, and multiple checkboxes can (and likely will) be selected. If I use = won't it only work if that is the only checkbox selected? I used ~ because I need it to trigger to create a ticket for creating a LastPass account if LastPass is selected and also if LastPass and AWS are selected
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In this case, if you want the field: "Required Accounts - Contractor" to make your automation work with more than one option contained, you should use the following JQL:
"Required Accounts - Contractor" IN ("LastPass", "AWS")
If any "Required Accounts - Contractor" option should make the automation work, you should use:
JQL> "Required Accounts - Contractor" is not EMPTY
So if the field has any of these values the automation will work.
Using "~" only works for text fields, it doesn't work for select list fields
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.