id = new Integer(idParam);
} catch (NumberFormatException e) {
request.setAttribute("error", "Issue id is not set correctly - you have probably used wrong link");
return mapping.findForward(ERROR);
}
Submit submit = Submit.getById(em, id);
if (submit == null) {
LOG.log(Level.WARNING, "Cannot find exceptions instance with id {0}", id);
response.setHeader("Refresh", "30"); // refresh the page in 30s
return mapping.findForward(PLEASE_WAIT);
}
// make updates
boolean merge = false;
if ((newissuezillaid != null) && (submit != null)) {
submit.getReportId().setIssueId(newissuezillaid, getClass());
submit.getReportId().setIssueManChanged(true);
merge = true;
}
if ((newduplicateof != null) && (submit != null)) {
Submit duplExc = null;
if (newduplicateof != null) {
duplExc = Submit.getById(em, newduplicateof);
}
submit.setReportId(duplExc.getReportId());
submit.getReportId().setDuplicateManChanged(true);
merge = true;
}
if ((subcomponent != null) && (subcomponent.length() > 0) && (component != null) && (component.length() > 0)) {