use of teamdash.hist.ProjectHistory in project processdash by dtuma.
the class WBSChangeHistoryReport method loadHistory.
private void loadHistory(HttpServletRequest req) throws ProjectHistoryException {
PDashContext ctx = PDashServletUtils.getContext(req);
PDashData data = ctx.getData();
ProjectHistory hist = ProjectHistoryFactory.getProjectHistory(data);
if (hist == null)
throw new ProjectHistoryException("Not_Team_Project_HTML_FMT", ctx.getProjectPath());
String dateParam = req.getParameter("before");
Date beforeDate = dateParam == null ? null : new Date(Long.parseLong(dateParam));
ProjectChangeList changes;
try {
changes = ProjectChangeListFactory.getChanges(hist, beforeDate, 10, true, true);
} catch (IOException ioe) {
throw hist.wrapException(ioe);
}
req.setAttribute("changes", changes);
req.setAttribute("followupTimestamp", changes.getFollowupTimestamp());
// compute the URI that will be used to open WBS hyperlinks
String processID = data.getString("Team_Process_PID");
String modeIndicator = Settings.isPersonalMode() ? "indiv" : "forteam";
String openWbsUri = "../" + processID + "/setup/openWBS.shtm?trigger&" + modeIndicator + "&showItem=";
req.setAttribute("openWbsUri", openWbsUri);
}
Aggregations