Automation trigger on release start date

Fong Xu May 6, 2023

Hi,

I am creating an automation rule in Jira automation section. but i am not sure how to create a trigger on Release dates, such as start date. I know that when you enter a fix version on a jira card, the release date is defined by default. So I think I can use the release start date to trigger an rule. Any suggestions? 

 

Thanks,

Fong

2 answers

1 vote
Robert Wen_Cprime_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 6, 2023

Hello @Fong Xu ! Welcome to the Atlassian Community!

This previous question talks about the same thing with regard to Release Date: https://community.atlassian.com/t5/Jira-Software-questions/How-can-I-use-the-release-date-of-a-version-in-JQL/qaq-p/1753211

I found the same thing where I couldn't use Release Date as a trigger or condition in Automation.

Fong Xu May 6, 2023

Hi Thanks for your info! 

So it is not possible to use Release Date as a trigger or condition in Automation?

Are they going to enhance it, so that this feature could be available in the next version of Jira? 

Thanks!

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.
May 6, 2023

Hi @Fong Xu -- Welcome to the Atlassian Community!

Would you please describe the problem you are trying to solve?  Knowing that may help the community to make suggestions.

Until we know that...

Let's assume you want to do something with issues assigned to a release.  In this case, you could gather the issues (with another trigger, branch, or lookup issues), and then parse out the release's information to take action.

Or, perhaps you want to do something based on releases which are not yet assigned to issues.  You could use a daily scheduled trigger, call the REST API to access the versions for the project, and then take actions based on the version information.

Both of these are more complicated rules and so knowing what you are trying to accomplish would help.

Kind regards,
Bill

Fong Xu May 6, 2023

Hi Bill, 

Thank you for the info! 

I look for a way to create a jira card/issue automatically every time when a release start or release date is defined.

When we assign a card or more than one card to a release, we use the fix/version field. by doing this, a release will be created in jira in Jira Releases section. I think I misspoken, the release date is not defined by default. When we confirmed a release, we will enter the release date, at that time, I hope that the automation that I need will automatically create a Jira card that lists generic implementation plan in the description field, so that we then assign the card to a developer who can use it during the actual release. I am able to create an automation, (I think Jira calls it Rule), that can create a card with the implementation plan that I defined when a fix/version field is entered. But this triggers to create a card every time that issue field updates…

Any ideas that I can fix it? 

 

Thanks,
Fong

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.
May 6, 2023

Thanks for that information.  First thing, I recommend mapping out all of your scenarios as this will help determine what is (or is not) possible with automation for Jira rules.

With that noted, there are two triggers that you might use if you flip the way you think of the scenarios...What if you detect when the version is created/updated to create the issue instead of when the dates arrive?

Version Created trigger: when a version is created, you could check for the information such as Start Date, and create the new issue.  Then if needed, use a scheduled trigger to act on that new issue.

And for the case when the dates were not set when the version was created, you could use the Version Updated trigger, check if the dates were set, and then create the issues as before.

Like Robert Wen_Cprime_ likes this
Fong Xu May 7, 2023

Thank you for the suggestion.

Do you mean that we can continue to use the fix/version field in an issue to create a Release item. Then when a release is confirmed, we will update the release item’s start date or release date in the release item, we can use version update trigger instead of issue update trigger, right? 

Let me check how to use version update/creation as a trigger instead of issue fix/version update/creation as a trigger. i will keep you posted.

Thanks!

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.
May 7, 2023

Yes, I believe either approach would work.

Fong Xu May 7, 2023

Hi Bill, 

I am not sure how to use the version. I attached three screenshots.

The rule screenshot is on the Rule page, when I select Version for the trigger, I need to specify a version name... What is Version? Is it the same as Release?

I want to use the Release item (release start date or release date) as a tigger. But I cannot find a Release in the trigger options list?

Any ideas?  Thanks much!

jira-auto-release-rule-trigger-2023-05-07_09-18-54.pngjira-auto-release-rule-version-2023-05-07_09-18-54.pngjira-auto-release-1-2023-05-07_09-18-54.png

Thanks,

Fong

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.
May 7, 2023

To level set a bit, are you using Jira Cloud or Server/Data Center?  And if using Server/Data Center, which version of automation for Jira are you using?

For Jira, the items you see on the "Releases" configuration are used in the version fields for issues, Fix Version and Affects Version.  So one is used by the other.  When using the DevOps features with Jira, there are other things related to software code which also have these same names.  For example, in Jira a "release" might include the Jira issues in the release and the code is in the physical release.

In automation rules, the triggers are named Version Created, Version Updated, etc.

Fong Xu May 7, 2023

Good question. How do I tell what version of Jira that I am using? Let me attach screenshot here. Could you help me determine? You see the screenshot that has Automation in it? That is where I start defining those Rules... 

Thanks!

 

jira-auto-release-jira-2023-05-07_09-18-54.pngjira-auto-release-auto-2023-05-07_09-18-54.png

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.
May 7, 2023

You appear to be on a server version (as you cannot see a Jira version with Cloud...it's is just whatever-they-released). 

And because can select the Version Created trigger, you are on the advanced (paid) version of Automation for Jira, rather than lite (free) version.

I suggest starting with the Version Created trigger to make your first rule, checking the dates with conditions, and then try to create your issue.  Here is the reference for the {{version}} smart values with that trigger: https://confluence.atlassian.com/automation/jira-smart-values-issues-993924860.html#Jirasmartvaluesissues-version

Fong Xu May 7, 2023

Thanks! Do you have any example of using regex in this case? 

I was trying to use the following to check not empty, it shows `invalid regular expression`. I tested `^\S+$` in https://regex101.com/. it is correct. But not sure using `.match()` function is right or not. Any ideas?

{{version.startDate.match("^\S+$")}}

And also, what does this mean? 

  • The rule has been configured with components that require issues to be provided by the trigger. To run these components you must add a branch for this version or JQL. The following components require issues: JQL condition

Thanks!

 

jira-auto-release-regex-2023-05-07_09-18-54.png

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.
May 8, 2023

I believe that field is a Version name filter, and so you only put in your expression and not the rest of the smart value for the field.

Fong Xu June 23, 2023

Hi Bill,

Thank you for your help again!

I believe that field is  a Version name filter, and so you only put in your expression and not the rest of the smart value for the field.

I am sorry, I am not sure what you mean above. Could you please be more specific or provide some examples?

Thanks so much!

Suggest an answer

Log in or Sign up to answer