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);
}
}
}
Aggregations