public void to(NormalTask openprojTask, Task task, OpenprojImportState state) {
//convert fields
FieldUtil.convertFields(task, NormalTask.class, openprojTask, fieldsToConvert, false);
FieldUtil.convertFields(task, CustomFields.class, openprojTask.getCustomFields(), customFieldsToConvert, false);
ConstraintType constraintType=(ConstraintType)task.get("constraintType");
if (constraintType!=null){
LongDateConverter converter=new LongDateConverter();
Long constraintDate=(Long)converter.to(task.get("constraintDate"));
openprojTask.setScheduleConstraint(constraintType.getId(),constraintDate==null?0:constraintDate);
}
//find calendar
WorkCalendar calendar=task.getCalendar();
if (calendar!=null){