Search in sources :

Example 11 with TeamMember

use of teamdash.team.TeamMember in project processdash by dtuma.

the class CsvNodeDataImporter method tweakInitialsData.

private void tweakInitialsData(WBSNode node) {
    String initials = (String) node.getAttribute(INITIALS_TEMP);
    Object timePerPerson = node.getAttribute(TIME_PER_PERSON_ATTR);
    if (initials == null || timePerPerson == null)
        return;
    String duration = (String) node.getAttribute(DURATION_TEMP);
    String[] intialsList = initials.split(",");
    for (int i = 0; i < intialsList.length; i++) {
        TeamMember m = getTeamMember(intialsList[i]);
        if (m != null) {
            String init = m.getInitials();
            Object time = timePerPerson;
            Double hoursPerWeek = m.getHoursPerWeek();
            if (hoursPerWeek != null && hoursPerWeek.doubleValue() != 0 && hoursPerWeek.doubleValue() != 20)
                time = Double.toString(parseDurationAsCustomHours(duration, hoursPerWeek));
            node.setAttribute(init + INDIV_TIME_SUFFIX, time);
        }
    }
}
Also used : TeamMember(teamdash.team.TeamMember)

Aggregations

TeamMember (teamdash.team.TeamMember)11 TeamMemberList (teamdash.team.TeamMemberList)6 Iterator (java.util.Iterator)4 List (java.util.List)4 ArrayList (java.util.ArrayList)3 Date (java.util.Date)3 HashMap (java.util.HashMap)3 Element (org.w3c.dom.Element)2 Dimension (java.awt.Dimension)1 GradientPaint (java.awt.GradientPaint)1 GridBagConstraints (java.awt.GridBagConstraints)1 Paint (java.awt.Paint)1 File (java.io.File)1 IOException (java.io.IOException)1 ParseException (java.text.ParseException)1 LinkedList (java.util.LinkedList)1 Map (java.util.Map)1 ButtonGroup (javax.swing.ButtonGroup)1 JLabel (javax.swing.JLabel)1 JMenu (javax.swing.JMenu)1