Forums

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

Automation to set issue end date to release end date when added to the release

Gina September 25, 2024

Hello,

I'm trying to match the end date of an issue to its release version, when it's added to the release. 

 

So, an issue without an end date is added to the release, I want to automatically copy the release end date to the issue end date. Here is what I built so far:

 

Screenshot 2024-09-25 at 8.16.38 AM.pngScreenshot 2024-09-25 at 8.16.48 AM.png

2 answers

0 votes
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.
September 25, 2024

Hi @Gina -- Welcome to the Atlassian Community!

You describe this: "...an issue without an end date is added to the release".  What do you want to do if the issue already has a Due Date (i.e., end date) value?

 

Next, the Fix Versions field in issues is a list of values.  The smart value expression you show will:

  • for each issue currently assigned to the release
    • check all of the fix versions assigned to the issue, 
    • and assign the one with the maximum Release Date to the Due Date

That will not necessarily be the version which triggered the rule.  Is that what you want to do?  If not, please see the suggestion from @Lisa Forstberg to assign the value from the trigger version.

 

Finally, what do you want to do if the trigger version does not have a release date set yet?

 

Kind regards,
Bill

Gina September 27, 2024

The project has versions set already. When we create a new ticket and add it to a version, I'd like the new ticket to copy the version due date as the ticket due date. In the screenshot below, you'll see SAND-12 is not assigned to a version.

Screenshot 2024-09-27 at 10.26.10 AM.png

When I assign SAND-12 to version Gabbro, I want the ticket to populate the same end date as version Gabbro.

But the automation instructions from Lisa don't get that result. The SAND-12 Due Date field remains blank.

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.
September 27, 2024

Thank you for the additional information.  The rule Lisa showed will update the issues assigned to the version when the version itself is updated, not the issues.

 

And so there are multiple scenarios to handle, and you may decide which scenarios (and rules) are needed.  Here are the ones I can think of to start (ignoring edge cases of empty fields, deleted versions, etc.):

GIVEN a version exists with an assigned release date
WHEN an issue is created and assigned to the version at the same time
THEN set the issue's due date to the version's release date

GIVEN a version exists with an assigned release date
AND an issue exists without an assigned version
WHEN the issue is updated and assigned to the version
THEN set the issue's due date to the version's release date

GIVEN a version exists
WHEN the version is updated with a new, non-empty release date
THEN for all issues assigned to the version, set the issue's due date to the version's updated release date

 

You show screen images for the second one, so let's do that one:

  • trigger: issue field updated for Fix Versions, with a value added
  • edit issue: setting the Due date to
    • {{issue.fixVersions.releaseDate.max}}

This assumes one (or more) values in the Fix Versions field, with the latest one by release date is what you want.

 

That rule could be copied, changing the trigger for issue created, like this:

  • trigger: issue created
  • action: re-fetch issue
  • condition: fix versions is not empty
  • edit issue: setting the Due date to
    • {{issue.fixVersions.releaseDate.max}}

 

The final rule could be what Lisa showed.

Like Pernille K_ Mohn likes this
0 votes
Lisa Forstberg
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.
September 25, 2024

Hi @Gina 

Welcome to the community!

I just tested this and smart value {{version.releaseDate}} seems to do the trick

Screenshot 2024-09-25 at 16.38.08.png

all the best

Lisa

Gina September 27, 2024

Thanks, Lisa - 

This works - when I update the version end date, issues in the version also get an update!

Suggest an answer

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

Atlassian Community Events