Forums

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

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 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
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 Champions.
June 16, 2018

I think your second script is closest to what you need, but it's worth explaining what Jira is doing.  When you look at this field on an issue, there are three possible types of response:

A list of values that includes TBC (return false)

A list of values that does not include TBC (return true)

Nothing, because there are no values selected, although Jira displays "none" in lists or hides the field completely (I think you want to return true here too)

So, I might be a lazy coder and write:

if ( cfValues['Testing required Up/Downstream']*.value )

{

   if ( cfValues['Testing required Up/Downstream']*.value.contains("TBC")

   { return false; }

}

return true;

(That says "if there is a list of values, and one of them is TBC, false, but for other cases, where there is a list without it, or no list at all, return true)

AdamCliff
June 17, 2018

Hello,

That was throwing the same error as my script. None was being seen as an error.

Finally got it to work though using the following line

!('TBC' in cfValues['Testing required Up/Downstream']*.value)

Thanks all for your help

Adam

0 votes
Joe Pitt
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 Champions.
June 16, 2018

I believe None is actually null in the database like Unresolved

Suggest an answer

Log in or Sign up to answer