Prevent issue to reopen after X days
I am interested in trying to prevent users from reopening a ticket after 30 days it’s been closed. I read more about it on, https://bitbucket.org/fcarmario/jira-workflow-toolbox/wiki/amazing/Validation%20and%20Condition%20Based%20on%20Time%20Expressions and am not sure how to accomplish this. I know that I want this to happen during the ‘Reopen’ transition. Would you be able to help me with this.
Thank you.
Comments (18)
-
repo owner -
reporter Thank you Fidel~ I tested this using (1 day) and it works perfectly! Thanks again.
-
repo owner - changed status to resolved
You are welcome :)
-
reporter Hi Fidel, Quick question. How can I allow it so that while in Jira Core, the ticket cannot be reopened after x amount of days so that the customer from the Service Desk is not able too?
Thanks,Erica
-
repo owner Hi @laujmimna,
The validator applies to any user who is trying to execute the transition, regardless of whether he is a JSD customer or JIRA Core user.
If you are experiencing an undesired behavior in the validation, please, describe it in detail, and attach a screenshot of the workflow you are using, or the part of it related to the transition where you inserted the validator.
-
reporter Thanks Fidel. I have a status "Escalate" set up to 'not re-open after x amount of days' from Jira Core.And I cannot open as expected. But on the Service Desk with that same ticket, I was able to reopen. Is there a configuration I'm missing?
Thanks, Erica
-
reporter -
repo owner Can you, please, attach an XML export of the workflow?
-
repo owner - changed status to open
-
reporter Thanks Fidel. I see an import but not an export. Is there a process you have that I can help deliver this file for you?
-
repo owner The following screenshot shows how to obtain the XML export of a workflow:
-
repo owner - attached OCHIN-workflow.xml
-
repo owner Hi @laujmimna,
You have 2 transitions that can make issue leave Closed status:
- Reopen, which has a boolean condition that blocks the transition after 14 days.
- Escalate, which is a global transition and doesn't have any condition or validator.
You should add a boolean condition or validator in global transition Escalate with the following expression:
%{00016} = "Closed" IMPLIES {00057} - {00112} < 14 * {DAY}
Where:
- %{00016} is field code for Issue status.
- {00057} is field code for Current date and time.
- {00112} is field code for Date and time of resolution
Note that since Escalate is a global transition, we have to use term
%{00016} = "Closed" IMPLIES ...
in order to limit condition related with time (i.e.,{00057} - {00112} < 14 * {DAY}
) only to Closed status. -
reporter - attached Test
Hi Fidel, here is the workflow.
-
reporter This error also occurs on the Escalate status when the issue is still open. I am not sure how to trigger after it's been closed and not open.
Thank you for all your help.
Erica
-
repo owner Use this boolean expression instead:
{00112} = null OR (%{00016} = "Closed" IMPLIES {00057} - {00112} < 14 * {DAY})
-
reporter Thank you Fidel! This solved it. :)
Have a great day!
-
repo owner - changed status to resolved
You are welcome :)
- Log in to comment
Hi @laujmimna,
You should add "Boolean validator with math, date-time or text-string terms" to "Reopen" transition with any of the following boolean expressions:
1) Less than 30 days since issue resolution
2) Less than 30 days since issue passed to "Closed" status
Note that:
{00057}
is field code for Current date and time.{00112}
is field code for Date and time of resolution."Closed"
is a string with the exact name of the closed status. Take into account that JIRA always shows the name of status in upper case. You should use the exact name, which can be checked up in status administration section of JIRA.