action.setRedirectURL(current);
try {
var today = new GlideDateTime();
var closed = new GlideDateTime(current.closed_at);
if (closed) {
var dateDiff = GlideDateTime.subtract(closed, today);
var dateDiffNum = dateDiff.getDayPart();
if (dateDiffNum > 30) {
gs.addErrorMessage("Un problema no se puede reabrir después de haber estado cerrado durante más de 30 días. Abra un problema nuevo.");
} else {
new ProblemStateUtils().onReAnalyze(current);
}
}
} catch (err) {
gs.error("A runtime error occurred: " + err);}