Forums

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

Automation triggers depending on day and time for a ticket transitioning to a specific status

Mark_Gallier December 20, 2022

I'm trying to set up automation so that when a ticket is transitioned to a specific status the fix version is updated depending on the time of day and the day in the week.

I want the fix version to be populated with the next unrelease version if the tickets status is changed after 12pm on a Monday. 

Can someone please help me work this out.

1 answer

0 votes
Trudy Claspill
Community Champion
December 20, 2022

Hello @Mark_Gallier 

Can you show us what you have so far for your automation rule? With which part are you struggling?

Also, what specifically is considered before, and after, 12 pm on a Monday?

Is any time on Sunday considered a "before" value? What about any time on Saturday?

Is the time zone important to determine if it is before or after 12 pm?

Mark_Gallier December 21, 2022

Hi Trudy,

We have a code cut off every week on a Monday at 12pm with the release planned to go live every Wednesday. What I am trying to do is work out how I can automate the fix version to select the relevant release week depending on when the ticket was transitioned into our 'In Master' status.

From what I've read the start of the week in Jira is listed as a Sunday so I have so far come up with this JQL to help with my automation:

updated >= startOfWeek(1d) AND updated >= startOfDay(12h)

This seems to work however now I need to be able to pick up the correct release version based on this timing. As an example, if we use this week starting on Sunday 19th December, when the ticket is moved into 'In Master' before this time frame I want the fix version to be set to what I have as 'Release WC 20/12/22' - however, if the ticket is moved to 'In Master' after this time I want the fix version to be set to 'Release WC 26/12/22. Does that make sense? 

I'm hoping I can work this out using the date and time to then automate which release it should be tagged to in the fix version. Hope you can help, thanks.

Automation trigger.JPG

Trudy Claspill
Community Champion
December 21, 2022

Do you have only one unreleased Version at a time, or do you have multiple unreleased Versions defined?

If you have only one unreleased Version at a time then you can set the Fix Version to "next unreleased version".

If you have multiple unreleased Versions, using "next unreleased version" will pick the one at the bottom of the list, regardless of the planned release dates, as per

https://jira.atlassian.com/browse/JSWCLOUD-21555

You would need to reorder the list so that your "next" release is at the bottom of the unreleased list.

Mark_Gallier December 22, 2022

I have multiple unreleased versions defined, one for each week up to 3 months in advance. If I map it to the next unreleased version it would map to the release for the current week, which is not what I'm trying to do. I want to be able to map it to the release for the following week. Is that possible at all do you know please?

Trudy Claspill
Community Champion
December 22, 2022

Based on the above you would need to manually be reordering your list so that the release you want selected is at the bottom of the list.

If the release are predefined, and if within the rule you can parse the available data about when the transition occurs to pull information that would be found in the Release/Version name, then I think you could set the Fix Version using Smart Values similar to what is described in this post by @Bill Sheboy 

https://community.atlassian.com/t5/Jira-Software-questions/Jira-Automation-Assigning-a-fix-Version-based-on-Component/qaq-p/1743389

Suggest an answer

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

Atlassian Community Events