Manual trigger vs Issue created trigger
Asked by Pamela Hein:

Scenario:

Create a form for 'Deboarding Employee' that captures : Employee Name , Last Work Day and Location. Using Automation - when the form is submitted -- email specific employees (based on location) of the 'Deboarding Employee'.

If I run the automation manually (against a previous created ticket with the deboard form attached) checking for Summary condition contains 'Employee Deboard' and status is one of 'Waiting for support' -- the automation works fine and will run as expected -- sends an email with 'Employee Name, Last work day and location' to specific employees that need to know of the 'Deboarding employee'. (Location is checked as to ensure what group of people need to be emailed)

* I've written to the audit log 'Employee Name' , 'Last work day' and 'Location' -- and the correct information is displayed there.

When I change the automation to trigger on 'When: issue created' checking the same conditions listed above -- the automation does not work as expected. Summary and Status are correct. When I check 'Location' to send email -- the location is blank (along with Employee Name and Last work day). Location is a custom field and a screen field. (both Employee Name and Last work day are also custom fields). I have referenced these fields as a 'named' field and as a custom field in the automation (issue.customfield_xxxxx). The audit log does not show any information in the fields. I am able to edit the 'description' field and add 'Deboarding Employee' without the employee name. I've also tried 'Re-fetch' -- 5 times for 5 seconds each -- and still no information in the 3 fields.

Any help is appreciated.

Please see attached screen shots.

JSM / Data Center - on prem

Service Mgmt 5.9.1


Answers:
author: Bill Sheboy
body: Hi [@Pamela Hein](/t5/user/viewprofilepage/user-id/5419111)

Without seeing the specifics of your rule or the audit log details, this symptom does seem like a delay / racetrack error.

If you look at an example issue's history, *when* do you see the fields populated: when the issue is created or at some time later?

Kind regards,  
Bill

comments: author: Pamela Hein
body: I've uploaded screen shots of the automation


author: Pamela Hein
body: ![Deboard-Automation-manual.png](https://community.atlassian.com/t5/image/serverpage/image-id/348440i59A7B97119D54F4E/image-size/large?v=v2&px=999 "Deboard-Automation-manual.png")![Deboard-Automation-when-issue-created.png](https://community.atlassian.com/t5/image/serverpage/image-id/348441iCEBB47FBB03A90ED/image-size/large?v=v2&px=999 "Deboard-Automation-when-issue-created.png")


author: Bill Sheboy
body: Thanks for those screen images.

Did you look at the issue history for AR-349 to observe when the Location and other custom fields were set?


author: Pamela Hein
body: ![Jira-AR361-history.png](https://community.atlassian.com/t5/image/serverpage/image-id/348447iEB174BAEF5B1F928/image-size/large?v=v2&px=999 "Jira-AR361-history.png")![Jira-AR361-log.png](https://community.atlassian.com/t5/image/serverpage/image-id/348448iBDB8D737E30D5CBE/image-size/large?v=v2&px=999 "Jira-AR361-log.png")


author: Pamela Hein
body: Bill,

I just re-ran the form and when issue created automation. Is it possible to add a delay from when the form is submitted to when the automation is launched?

thank you,

Pam


author: Bill Sheboy
body: That does appear to be a timing problem, and I would have expected a single Re-fetch Issue action after the trigger to have resolved this (given what the history shows).

I recommend working with your Site Admin to contact Atlassian Support to learn what they suggest: <https://support.atlassian.com/contact/#/>

While waiting for them to respond...you might try calling the REST API to get the form data directly using the Send Web Request action.


author: Pamela Hein
body: Bill,

Thank you for your time. I will contact Atlassian for suggestions.

Pam


Tags: jira-data-center