private List<PhaseField> getPhasesStatuses(DaySchedule daySchedule,
			List<TaskRow> tasksData) {
		List<PhaseField> tmpPhaseFields = new ArrayList<PhaseField>();
		
		String prevProjectName = tasksData.get(0).getProjectName();
		String prevPhaseName = tasksData.get(0).getPhaseName();
		int phaseStatus = 0;
		int row = 0;
		while(row < tasksData.size()){
			String currProjectName = tasksData.get(row).getProjectName();
			String currPhaseName = tasksData.get(row).getPhaseName();
			ScheduleField field = daySchedule.getScheduleFields().get(row);
			
			if(prevPhaseName.equals(currPhaseName) 
					&& prevProjectName.equals(currProjectName)){
				if(field.getWorkDone() >= tasksData.get(row).getDurationTime()){
					if(phaseStatus == 0){
						phaseStatus = 2;
					}
				}else if(field.getWorkDone() > 0){
					phaseStatus = 1;
				}
				row++;
				// jesli dojde do konca to musze dodac ta faze
				if(row == tasksData.size()){
					PhaseField phaseField = new PhaseField();
					phaseField.projectName = currProjectName;
					phaseField.phaseName = currPhaseName;
					phaseField.phaseStatus = phaseStatus;
					tmpPhaseFields.add(phaseField);
				}
			}else{
				PhaseField phaseField = new PhaseField();
				phaseField.projectName = prevProjectName;
				phaseField.phaseName = prevPhaseName;
				phaseField.phaseStatus = phaseStatus;
				tmpPhaseFields.add(phaseField);
				// nie zwiekszam zmiennej row -> musze  
				// jeszcze raz przeleciec petla po tym wierszu
				phaseStatus = 0;
			}
			prevProjectName = currProjectName;
			prevPhaseName = currPhaseName;
		}
		
		return tmpPhaseFields;
	}