Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Field Not Empty Automation Fail

Erzsébet Vályi-Nagy August 18, 2021

Hello, 

I have an issue+request type with a few "copies" of the same field (multiple product numbers added to one request), so I have custom fields such as:

Part Number 1 

Part Number 2

etc. 

These are not filled the same number for every incoming request, so some may have only 1 part number associated with it, others may have 4 for example (we will allow up to 10). 

What I'd need is a pretty simple automation: If the field "Part Number 2" is not empty, create a subtask, and copy some details of the original issue to that subtask. automation screenshot.png

I'd make 9 "copies" of this automation, so if for example 7 part numbers are added for a request, 6 subtasks are created. 

The problem is that when an issue is created, it seems that in that precise moment when the automation runs, the custom field still shows as empty for the system, despite the fields being populated when I actually open the issue 3 seconds after submission.

For example, if I change the condition to not equal to "Turtle", the subtask creation part of the automation does work (the copying over of the chosen fields will not, will all show up as empty, which I suspect is for the same reason, in the precise moment when the issue is created, the cells still seem empty in the system for that 1 second before being populated probably).

When I check the Audit log, it says No actions performed, under details it says the Issue did not meet the conditions, despite the fact that I know it does, as the relevant field, for example Part Number 2 is filled out. 

I tried both the simple 'is empty' , and the "is not equal to Value" conditions with Empty and None. Tried also to change the default value of the field to "Empty" from "None" so it definitely has "Empty" there, unless something was written in the form. 

Can anyone help me with how this might be solved? 

Thank you very much in advance! 

2 answers

1 accepted

1 vote
Answer accepted
Erzsébet Vályi-Nagy August 18, 2021

In case anyone needs this in the future, I have found the solution.

I have been using ProForma for my portal requests, and the issue has been that ProForma was still moving the inputs into their relevant fields, when the automation was triggered by he issue being created. As a result, the automation picked up the inputs in the fields that were not there yet, and all of them showed as empty to the system. 

Therefore, the workaround was that there needed to be a forced "step 0", that preceded the automation, so proforma had time to move all the data into their relevant fields. 

So Step1:

I was able to do this by creating a new "Being Created" Step in my Workflow, right before "Open" (a copy of default jira workflow in this case). image.png

For Step2: I added an Automation to my ProForma Request form. (Note: that can be accessed through the form settings, "Add a Rule" not the same things as automations for the project!) 

The rule is the following: When the form is submitted > For "XY Issue Type" > If The issue status is "Being Created" > Then: Change issue status to "Open" 

Then, Step 3: I have changed the original trigger (issue created) to "Issue transitioned From: "Being Created" to "Open", then added the same condition (Custom Field not empty) and Action (Create Subtask with a number of Fields being copied over from the Parent (need to choose "Current Issue") 

(Optional) Step 4: As I did not want my subtasks to now be created and then appear with the "Being Created State", I have added a Branch for the Sub-tasks, and added Transition Issue to "Open"

automation screenshot_solution.png

0 votes
Jack Brickey
Community Champion
August 18, 2021

You may be running into a race condition. Try inserting a re-fetch action at the very beginning of your rule.

Erzsébet Vályi-Nagy August 18, 2021

I have found another workaround, but thank you for your answer! :) 

ProForma was running the same time as the issue was created, which is why the inputs for the fields were not there yet when the automation was running. I was able to bypass that by adding an extra state to the workflow before 'open' and an automation to ProForma, that once the form was submitted, the issue was transitioned from one state to the other. The issue transitioning to the second state (open) became the trigger for my new (Jira) automation, and that ended up being the solution :) 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events