Search in sources :

Example 6 with EVTaskList

use of net.sourceforge.processdash.ev.EVTaskList in project processdash by dtuma.

the class DirectTimeMemberTrendChartData method recalc.

public void recalc() {
    clearSeries();
    // see if the user has permission to view personal data in this chart
    UserFilter f = GroupPermission.getGrantedMembers(permissionID);
    if (f == null)
        return;
    EVTaskListFilter pf = new EVTaskListGroupFilter(f);
    EVSchedule schedule = rollup.getSchedule();
    series.add(schedule.getPlanTrendChartSeries());
    MemberChartNameHelper nameHelper = new MemberChartNameHelper(rollup);
    for (int i = 0; i < rollup.getSubScheduleCount(); i++) {
        EVTaskList tl = rollup.getSubSchedule(i);
        String personalDataID = tl.getPersonalDataID();
        if (personalDataID != null && !pf.include(personalDataID))
            continue;
        EVSchedule subschedule = tl.getSchedule();
        String seriesName = nameHelper.get(tl);
        maybeAddSeries(subschedule.getActualTimeTrendChartSeries(seriesName));
    }
}
Also used : EVTaskListFilter(net.sourceforge.processdash.ev.EVTaskListFilter) EVTaskListGroupFilter(net.sourceforge.processdash.ev.EVTaskListGroupFilter) EVSchedule(net.sourceforge.processdash.ev.EVSchedule) UserFilter(net.sourceforge.processdash.team.group.UserFilter) EVTaskList(net.sourceforge.processdash.ev.EVTaskList)

Example 7 with EVTaskList

use of net.sourceforge.processdash.ev.EVTaskList in project processdash by dtuma.

the class EarnedValueMemberTrendChartData method recalc.

public void recalc() {
    clearSeries();
    // see if the user has permission to view personal data in this chart
    UserFilter f = GroupPermission.getGrantedMembers(permissionID);
    if (f == null)
        return;
    EVTaskListFilter pf = new EVTaskListGroupFilter(f);
    EVSchedule schedule = rollup.getSchedule();
    double mult = 100.0 / schedule.getMetrics().totalPlan();
    series.add(schedule.getPlanTrendChartSeries());
    MemberChartNameHelper nameHelper = new MemberChartNameHelper(rollup);
    for (int i = 0; i < rollup.getSubScheduleCount(); i++) {
        EVTaskList tl = rollup.getSubSchedule(i);
        String personalDataID = tl.getPersonalDataID();
        if (personalDataID != null && !pf.include(personalDataID))
            continue;
        EVSchedule subschedule = tl.getSchedule();
        String seriesName = nameHelper.get(tl);
        maybeAddSeries(subschedule.getActualValueTrendChartSeries(seriesName, mult));
    }
}
Also used : EVTaskListFilter(net.sourceforge.processdash.ev.EVTaskListFilter) EVTaskListGroupFilter(net.sourceforge.processdash.ev.EVTaskListGroupFilter) EVSchedule(net.sourceforge.processdash.ev.EVSchedule) UserFilter(net.sourceforge.processdash.team.group.UserFilter) EVTaskList(net.sourceforge.processdash.ev.EVTaskList)

Example 8 with EVTaskList

use of net.sourceforge.processdash.ev.EVTaskList in project processdash by dtuma.

the class EVConfidenceIntervalUtils method makeHistoricalConfidenceIntervals.

/**
     * Analyze the data in a list of earned value schedules, produce confidence
     * intervals representing this historical dataset, and return the results of
     * this analysis as a simple string that can be persisted for later use.
     * 
     * @param ctx
     *                the dashboard context
     * @param taskListNames
     *                the names of earned value schedules that should be
     *                included in the analysis
     * @return a string for persistently storing the results of this analysis
     */
public static String makeHistoricalConfidenceIntervals(DashboardContext ctx, Iterable<String> taskListNames) {
    if (taskListNames == null)
        return null;
    StringBuffer result = new StringBuffer();
    result.append(//
    "<" + HIST_INTERVALS_TAG + " " + VERSION_ATTR + "='1'>");
    List<EVTaskList> taskLists = new ArrayList<EVTaskList>();
    for (String taskListName : taskListNames) {
        EVTaskList tl = EVTaskList.openExisting(taskListName, ctx.getData(), ctx.getHierarchy(), ctx.getCache(), false);
        if (tl == null)
            continue;
        tl.setDependencyCalculator(null);
        tl.recalc();
        taskLists.add(tl);
        result.append("<" + HIST_TASK_LIST_TAG + " " + NAME_ATTR + "='").append(//
        XMLUtils.escapeAttribute(taskListName)).append("' />");
    }
    if (taskLists.isEmpty())
        return null;
    EVTimeErrConfidenceInterval time = new EVTimeErrConfidenceInterval(taskLists);
    if (time.getViability() >= ConfidenceInterval.ACCEPTABLE)
        time.saveToXML(TIME_ERR_INTERVAL_TAG, result);
    EVCostConfidenceInterval cost = new EVCostConfidenceInterval(taskLists.toArray());
    if (cost.getViability() >= ConfidenceInterval.ACCEPTABLE)
        cost.saveToXML(COST_INTERVAL_TAG, result);
    result.append("</" + HIST_INTERVALS_TAG + ">");
    return result.toString();
}
Also used : ArrayList(java.util.ArrayList) EVTaskList(net.sourceforge.processdash.ev.EVTaskList)

Example 9 with EVTaskList

use of net.sourceforge.processdash.ev.EVTaskList in project processdash by dtuma.

the class EVCostConfidenceInterval method getTasksForTaskLists.

private static List getTasksForTaskLists(Object[] taskLists) {
    Map<String, EVTaskList> uniqueLists = new HashMap<String, EVTaskList>();
    getUniqueTaskLists(taskLists, uniqueLists);
    ArrayList result = new ArrayList();
    for (EVTaskList taskList : uniqueLists.values()) {
        List<EVTask> evLeaves = taskList.getFilteredLeaves(null);
        result.addAll(evLeaves);
    }
    return result;
}
Also used : HashMap(java.util.HashMap) EVTask(net.sourceforge.processdash.ev.EVTask) ArrayList(java.util.ArrayList) EVTaskList(net.sourceforge.processdash.ev.EVTaskList)

Example 10 with EVTaskList

use of net.sourceforge.processdash.ev.EVTaskList in project processdash by dtuma.

the class EVTimeErrConfidenceInterval method getUniqueSchedules.

private static void getUniqueSchedules(Collection<EVTaskList> taskLists, Map<String, EVSchedule> results) {
    for (EVTaskList taskList : taskLists) {
        if (taskList instanceof EVTaskListRollup) {
            EVTaskListRollup rollup = (EVTaskListRollup) taskList;
            Collection<EVTaskList> subTaskLists = rollup.getSubSchedules();
            getUniqueSchedules(subTaskLists, results);
        } else {
            String key = taskList.getID();
            if (!StringUtils.hasValue(key))
                key = taskList.getTaskListName();
            results.put(key, taskList.getSchedule());
        }
    }
}
Also used : EVTaskListRollup(net.sourceforge.processdash.ev.EVTaskListRollup) EVTaskList(net.sourceforge.processdash.ev.EVTaskList)

Aggregations

EVTaskList (net.sourceforge.processdash.ev.EVTaskList)26 EVTaskListRollup (net.sourceforge.processdash.ev.EVTaskListRollup)8 EVTaskListGroupFilter (net.sourceforge.processdash.ev.EVTaskListGroupFilter)7 UserFilter (net.sourceforge.processdash.team.group.UserFilter)7 ArrayList (java.util.ArrayList)5 EVSchedule (net.sourceforge.processdash.ev.EVSchedule)5 EVTask (net.sourceforge.processdash.ev.EVTask)5 EVTaskListFilter (net.sourceforge.processdash.ev.EVTaskListFilter)5 Iterator (java.util.Iterator)4 TreePath (javax.swing.tree.TreePath)4 Date (java.util.Date)3 HashSet (java.util.HashSet)3 DefaultTaskLabeler (net.sourceforge.processdash.ev.DefaultTaskLabeler)3 EVDependencyCalculator (net.sourceforge.processdash.ev.EVDependencyCalculator)3 EVTaskListData (net.sourceforge.processdash.ev.EVTaskListData)3 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 Set (java.util.Set)2 EVTaskFilter (net.sourceforge.processdash.ev.EVTaskFilter)2