I have an Object type called Job Title in my Assets Schema.
I also have an input Jira form where users can input new Job Titles to be added to the database.
My requirement is when a new Job Title is approved, it should be added as an entry to the existing Job Title list.
Is it possible through Jira automation?
Hey @Ghata Singhal
Yes, this is possible.
You first need to check if the new title already exist and only if not then create it.
Go to Global Automation and create the following:
lets say that the trigger is status = approved for example.
Then do the following:
1. Create a var "TitleExist" with value 0
2. Run a "Branch on AQL" and query "objecttype = "Job Title" AND Name = "{{issue.fields.Job Title}}"
3. Then create the same var as step 1 but set value to 1
4. log a message that value already exist.
This is step A - it will first run a check if the value already exist in the object list, if it wont find it in A.I 2, it will not set the value of the var to 1 and will keep it to 0.
Then for the add phase:
1. Run an IF statement "IF TitleExist does equal 0" then
1.1 Add action "Add Object" , select the scheme and the object you want to update and under Name set {{issue.fields.Job Title}}
1.2 add a log message to update that a new object was created.
Hope that helps.
Ariel.
That should do the trick.
Thanks for this solution.
I also figured that you don't need to run a branch query to check if the title already exists. If you set your Attribute setting to "Unique", the automation rule runs and gives an error that the value already exists and does not create a new object with the same name.
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.