how to prevent users from reopening a case if it's been more than 7 days since closure

assaf lev March 20, 2016

Hi Guys,

Along with all other uses, we use JIRA as our IT helpdesk system.

Currently, users are able to reopen a case anytime, even years old cases
I would like to make a change so that along with other requirements - A workflow cannot transition if it's been more than 7 day since closure.

Any advise?
Thanks

3 answers

1 accepted

1 vote
Answer accepted
assaf lev March 22, 2016

Hi guys,

Thanks for taking the time trying to help, it is much appreciated.

 

Just wanted to update what I have eventually done:

Since I am no script master, I used the JQL query function of script runner with the following query:

"status in (Resolved, "Closed With No Resolution", Closed) and status changed AFTER -7d"

I used this as a condition for the "Reopen" workflow transition and it worked perfectly.


Thanks again!

Assaf

6 votes
Michael Partyka
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 20, 2016

Hi Assaf,

yes workflow condition is the simplest solution here.

You can use script condition. E.g. install Old version of Script Runner plugin (it is for free)

In 5 minutes you will be able to set this condition using powerful Script runner plugin.

4 votes
Jeff Louwerse
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 20, 2016

add a workflow condition.  If you have scriptrunner it is pretty easy, if not, a little bit more work. 

Code should be pretty straight forward though.. Create a timestamp 7 days in the past, compare that the the RESOLVED date.  Or add 7 days the the resolved date and compare that to current date.

 

Someone else has previously answer this question and supplied the code required. 

https://answers.atlassian.com/questions/280704

Suggest an answer

Log in or Sign up to answer