Forums

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

How to show pop-up transition screen only when date field value is greater than current date ?

Vikrant Yadav
Community Champion
March 14, 2020

Hi Team,

I have one query, i want to show transition screen only when date field condition is true otherwise no transition screen to pop-up. I have a scriptrunner plugin but don't know, what to do and how to do. please help.  

2 answers

1 accepted

1 vote
Answer accepted
Ravi Sagar _Sparxsys_
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 15, 2020

Hi @Vikrant Yadav 

Interesting question. What you can do is create 2 transitions from the same source to target state. Something like Start Progress and Start Progress (Review in Future). 

 

Transition: Start Progress will have no transition screen and a Script Condition as shown below.

cfValues['Review Date'] < new Date()

Transition: Start Progress (Review in Future) will have a transition screen and a Script Condition as shown below.

cfValues['Review Date'] > new Date()

This is the simplest way I can immediately think of. Let me know if it works.

Ravi

Vikrant Yadav
Community Champion
March 16, 2020

Hi @Ravi Sagar _Sparxsys_  Thanks a lot :)

Ravi Sagar _Sparxsys_
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 17, 2020

Glad it was useful. I also made a video demonstrating how it can be done using SR4J.

0 votes
Adam Rypel _MoroSystems_
Community Champion
March 15, 2020

Hello @Vikrant Yadav ,

you could use Validator for that transition, Date Compare Validator to be specific. Jira does not let you transition to the next status if this validator is set:

Výstřižek.JPG

More info on Validators here: https://confluence.atlassian.com/adminjiracloud/advanced-workflow-configuration-776636620.html#Advancedworkflowconfiguration-validators

Let me know if that helped.

Regards,

Adam

Suggest an answer

Log in or Sign up to answer