Search in sources :

Example 1 with ProjectHistory

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);
}
Also used : PDashContext(net.sourceforge.processdash.api.PDashContext) ProjectChangeList(teamdash.hist.ProjectChangeList) PDashData(net.sourceforge.processdash.api.PDashData) ProjectHistory(teamdash.hist.ProjectHistory) IOException(java.io.IOException) ProjectHistoryException(teamdash.hist.ProjectHistoryException) Date(java.util.Date)

Aggregations

IOException (java.io.IOException)1 Date (java.util.Date)1 PDashContext (net.sourceforge.processdash.api.PDashContext)1 PDashData (net.sourceforge.processdash.api.PDashData)1 ProjectChangeList (teamdash.hist.ProjectChangeList)1 ProjectHistory (teamdash.hist.ProjectHistory)1 ProjectHistoryException (teamdash.hist.ProjectHistoryException)1