how do I limit the time of when a user can reopen an incident i.e. after 30 days they can't reopen?

btreseder
Kilo Expert

how do I limit the time of when a user can reopen an incident i.e. after 30 days they can't reopen?

1 ACCEPTED SOLUTION

Sorry, i think i made a blunder here. I reversed the operator



replace this line


if(difference < thirtyDays )




with this




if(difference > thirtyDays )




I just cross checked it on a demo instance, it seems to work fine there


-Anurag

View solution in original post

21 REPLIES 21

But wots the point of showing the ReOpen button when you its not supposed to do anything. It should be visible only where it is supposed to make any change , ie tickets that can be reopened.


-Anurag

We have been having issues of employees using that button after 6 months has gone by. Most time their issue isn't the same, they just didn't want to fill out a new request.   So we would like to limit the button to 30 days of the closed state.


Exactly my point.



So here are your 2 options, choose and proceed



1) after 30 days passed since the ticket closed - reopen option not available


2) after 30 days passed since the ticket closed - reopen option available but thrown an error when clicked.


-Anurag

yes, I think I prefer the first option where they don't even see it after 30 days.


Slava Savitsky
Giga Sage

Consider using different statuses for this. Out-of-box you have Resolved and Closed statuses. Incidents can automatically go from Resolved to Closed after X days. Use glide.ui.autoclose.time system property for this. Then you could simply allow your users to reopen Resolved incidents but not Closed incidents.