Forums

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

How to send email when release version date changes (Jira Automation)

James_Gigantes
Contributor
November 21, 2022

I'm writing an automation. I would like to send an email whenever the {{version.releaseDate}} Changes. However I don't want to send an email if the name of version or if new tickets are added to the version so the basic "Version updated" trigger wont cut it unless I can identify that the release date was the specific change. 

 

I have tried logging the following in effort to identify comparable values: 

// this produced only the new value //Old Version Release Date: {{version.releaseDate}}{{fromString}}

// this produced only the new value //New Version Release Date: {{version.releaseDate}}{{toString}}

// This doesnt work// Field change from string: {{fieldChange.to}}

// this worked but only states the event // Event type: {{eventType}}

1 answer

1 accepted

2 votes
Answer accepted
Bill Sheboy
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.
November 21, 2022

Hi @James_Gigantes 

Short answer: I do not believe that is possible with the built-in rules features.

Longer answer:

The {{changelog}} and {{fieldChange}} smart values appear to be intended for the issue-related triggers, and not the other ones, such as Version Updated.

The history information is available, if you are a site admin, as it is shown in the system audit log.  So one way to get the information is a work-around using a webrequest to call the REST API to gather this information, and then parse out the details for your versionId and the changedValues.  If you want to try that, here are a couple of references:

A side note: In case you try to solve this using issue-related triggers: the change log in automation rules currently does not work for list fields like fixVersion.  Here is the defect for that: https://jira.atlassian.com/browse/JIRAAUTOSERVER-207

Kind regards,
Bill

James_Gigantes
Contributor
November 21, 2022

Bill

    Unrelated - Thanks for being so classy and following up on so many tickets as you do.

 

   Back to my ask. I figured out a roundabout way to get this to work. I utilized a "release story" within the version. I created another automation to add a release story every time a version is created. I also have another automation that auto assigns tickets within the version to the release story. With the fix in place (utilizing the release story as a place holder for current date) I can check it with a pseudo variable created. 

Release Date Update.JPG

Bill Sheboy
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.
November 21, 2022

Well done, and that's a good work-around!

As a suggested improvement to your rule...maybe check if lookup returns no issues (or more than one issue), and then take an appropriate actions.  For example, what if the Release Story add fails, or someone else uses your ReleaseStory label?

Like James_Gigantes likes this
James_Gigantes
Contributor
November 21, 2022

I will create a notification. 

Suggest an answer

Log in or Sign up to answer