Preventing issue reopen after X days

Deleted user April 3, 2014

I am looking for a way to block issues from being reopened after X numbers of days. People reopening issues is affecting numbers for our IT team. We do not want to fully block reopen as we see the value in sometimes opening an issue again. Can anyone help?

3 answers

1 accepted

2 votes
Answer accepted
Fabio Racobaldo [Herzum]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2014

Hi Daniel,

this should be exactly the condition that you need. I just tested it in my local instance.

import java.util.Calendar;
import com.atlassian.jira.issue.Issue;
import java.text.SimpleDateFormat;

Issue issue  = issue;
if(issue.getResolutionDate()!=null){ 
	Calendar now = Calendar.getInstance();
	now.setTimeInMillis(System.currentTimeMillis());
	Calendar resolutionDate = Calendar.getInstance();
	resolutionDate.setTimeInMillis(issue.getResolutionDate().getTime());
	resolutionDate.add(Calendar.DATE, 8);
	if(now.before(resolutionDate)){
		return true;
	} else {
        	return false;
        }
}
return true;

Deleted user April 4, 2014

Hi Fabio,

Is there a way to do it with out the groovy script? We disabled groovy on our system.

Daniel

0 votes
Fabio Racobaldo [Herzum]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2014

Hi Daniel,

if you can't use script runner plugin, you can create a java plugin with the code above.

Fabio

0 votes
Fabio Racobaldo [Herzum]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 3, 2014

Hello Daniel,

you can easly add a condition in your workflow transition that check issue closure date.

Fabio

Deleted user April 3, 2014

Hi Fabio,

Here is what I have and it is still allowing me to reopen an issue.

The transition requires the following criteria to be valid

  1. Verifies that field Resolved is less than or equal to value of 8d. Including time part.

What am I missing?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events