It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to allow a transition on the following 7 days.

Hello everyone! It's a pleasure to be here.

I'll describe my current issue with you and if anyone can offer me some help it will be much appreciated.

What I want to achieve: I want an issue that has been transitioned to status "closed" to be able to move to status "open" with the transition "reopen" for the following 7days after arrives to the status "closed".

What I did at moment:

1. All statuses can go to closed as per image image.png

2. I did set up a postfunction when an issue enters closed status to a custome fieldimage.png

So the custom field get the current date when the issue enter the status.


3. I added a post function from closed to nuevo transition that only allows the transition to work for 7d


At this point, the transitión button is not even appearing on the issue test, which is really strange. I'm doing wrong the condition that allows to transition? I think it's correct.

Or maybe I missed some step in the middle?

Any help would be much appreciated.


As an extra step, it's possible to make the button dissapear after 7days have passed in the view issue screen?


Kind regards.



3 answers

2 votes
Elifcan_Cakmak Community Leader Apr 03, 2019


First thing that stands out here is that you set the custom field to a date. So your custom field's value will be something like : 04.04.2019. However on the condition you are trying to compare this to "-7d" as date without time. But "-7d" is not a date. 

Instead you can do something like this: Set the custom field value as 7 days from today. For example 11.04.2019. On the condition compare this to today's date. You should set it as if the custom field's value is smaller or equal to today's date.

This way, if the custom field's value is 11.04.2019 and today's date is 12.04.2019 for example, the condition will be applied and the button will disappear after 7 days the issue is closed.


Elifcan, sorry to ask you again but there is something I'm not able to figure out.

How can I do the "Set the custom field value as 7 days from today. For example 11.04.2019"? I can't figure out the JQL in order to do the current date and 7 days.

Mind to help me with it? Thanks again for your help.

Elifcan_Cakmak Community Leader Apr 03, 2019

Hello again, 

No bothers. I didn't test this, but I'm thinking something like that should work: %%CURRENT_DATETIME%%+7d

Also if you have a plugin like script runner, you can set this field with a custom script,too. I'm on the phone right now, I will try to test it when I get to my computer.


Elifcan, as far as I've been able to investigate, it is not possible to add days using "Update Custom Field" post-function. You can only set it to current date value. So my only alternative is to use Script Runner with a custom script.

Not sure tho if you've been able to make it work because I've not been able to.

Thanks again for your help.

Elifcan_Cakmak Community Leader Apr 04, 2019

Hi, yes you're correct I couldn't be able to make it work either :( As you said you can use script runner or apply the solution offered by @Antoine_Berry  I also think that is the best solution, too.


1 vote
Antoine_Berry Community Leader Apr 03, 2019


Approving Elifcan solution in your case. That being said, a good practice is having a status "Resolved" before "Closed" from which you can reopen the issue. Let the user decide to close or reopen the issue. If it has not been closed after 7 days, auto-close (with scriptrunner addon for example). This allows for better visibility for the users.


Thanks for both replies. I'll look forward and will get back as soon as I try out. I'll update this comment after.

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you