Forums

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

Trigger post function only once if custom field is empty

Hana Katergi September 17, 2023

Hello,

I have a custom field on my Jira issue which is a date field. When a workflow status changes to 'In UAT' I would like a post function to trigger and populate my custom date field with the current date. I have been able to do this successfully. 

My question is, I only want my post function to trigger only once to populate the custom data field and that is on the first time the workflow status changes to 'In UAT'. If I go back and forth after that with different workflow status, I don't want to post function to update the custom date again each time it goes back in to 'In UAT'. Please can someone let me know if this is possible? 

Also, is it possible to set a condition on the post function for it to only populate if it's the first time the workflow status is set to 'In UAT' and if the custom field is empty (incase the date gets manually deleted)?

Thank you 

1 answer

0 votes
Akash Kumar Gupta
Contributor
September 17, 2023

Hi @Hana Katergi - Jira Workflow Toolbox and JMWE plugins have the feature to add conditions in the post functions.

-Akash

Hana Katergi September 17, 2023

Thanks for the reply. Is it possible to do without a plugin?

Thank you

Akash Kumar Gupta
Contributor
September 17, 2023

It is possible through project automation.

-Akash

Hana Katergi September 17, 2023

Do you have an example please?

Akash Kumar Gupta
Contributor
September 18, 2023

Trigger: Issue transition

From Any Status to 'In UAT'

Condition: JQL condition

Date_field is Empty

Action: Edit issue

Set the Date_field to {{now.jiraDate}}

 

-Akash

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events