Forums

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

Block transition until time window

Tim Finch
Contributor
March 6, 2023

Hi All,

I suspect I already know the answer to this, but thought I'd ask here incase there are any options I may have missed....

Working on a new implementation of JSM.

For the change workflow, the change team have asked that the transition into 'In progress' be blocked until the change window opens.
The change window (start/end date and time) are set in the ticket, so the ask it to block the transition until the change start date/time.

Is this even possible?

1 answer

0 votes
Diogo Teles
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.
March 6, 2023

Hi Tim,

If you have a date field with the start date for the change window, you can edit the workflow to add a "date compare" validator to the transition to "In Progress". You need to be a Jira admin to do this. It will block the transition if the current date is not greater or equal to the window start date.

The screenshot shows what this setup screen for this validator looks like (the "Compare with" value is just an example, you'd have to select the field relevant for your use carE)

 

Screenshot 2023-03-06 101603.png

Tim Finch
Contributor
March 6, 2023

Hi @dio 
That would be great, and I have already looked at the validator.

But 'Current Date' is not an option.

I was thinking...
Add a customer field 'date validator'
Add an automation rule to update that field with the current date.
Use the above validator to validate the custom field to the start date.

But obviously I'd like a rule that doesnt involve an additional custom field and automation to update that field, just for this...

Like Diogo Teles likes this
Diogo Teles
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.
March 6, 2023

Hi Tim,

That is a good point, and that explains why I can see 'Current Date' in my field options. I had forgotten that I did exactly what you suggested. A couple of years ago, I encountered the same problem and created the 'Current Date' field. Then used a scheduled automation rule to populate it with {{now}} at the start of every day. That way, I could use it in validators.

That rule is still running today. Looking at the project settings, the screen scheme for the issue type it is associated with has the custom field 'Current Date' on the view screen, but that field is hidden in the layout options (the screen scheme has a separate screen for editing which does not include that field). That way, the field can be edited by automation and used by date compare validators, but the user does not see it.  

It is a shame we can't do such a simple compare with the vanilla validator

Like Tim Finch likes this
Diogo Teles
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.
March 6, 2023

There are, of course, apps that will add this functionality to workflows. For example, JSU

Script runner can probably also achieve the same

Like Tim Finch likes this

Suggest an answer

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

Atlassian Community Events