Forums

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

JIRA Automation Script - how to persist or reindex issue in script

William Crighton [CCC]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 5, 2023 edited

I have a JIRA Software (Data Center) Automation script that does the following:

Script to take the custom field "Product" value and find the matching Component value (in the issue's project), sets the issue Component value and the issue reporter to the Component Lead

After the script executes I have a followup action which generates a notification to the issue reporter.

The problem is when the automation script executes the changes to the issue made by the script are not 'picked up' by the subsequent automation component which generates the notification. The notification is set to the issue reporter set before the automation activity starts.

How can I 'persist' the issue changes made during script execution so the notification is sent to the 'new' issue owner (the component lead) when the second automation component is run?

NOTE: the changes made to the issue by the automation script _are_ persisted to the database - after the issue is created (automation script listens for issue creation) the issue component is set correctly and the issue reporter is updated to the component lead. The problem is that the notification is sent to the actual issue reporter, not the person the issue reporter is updated to during the automation script execution. And it's not the standard 'new issue' notification, it's the custom notification defined in the automation rule.

1 answer

1 accepted

3 votes
Answer accepted
Radek Dostál
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 5, 2023

This is what the 'Re-fetch issue data' is for:

refetch.png

William Crighton [CCC]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 5, 2023

That's exactly what I needed! Thanks man!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.20.2
TAGS
AUG Leaders

Atlassian Community Events