Potential problems in Aspose Task

The type of SF predecessors is not consistent. It does not use the same logic as MS-Project.


For example:

The A1 activity starts on 06.25.2015.
The A2 activity has as predecessor the A1 activity with SF (star-finish). The A2 activity should end on 6.25.2015 (08:00 hours), however, it ends on 06.24.2015. This scenario in MS-Project, the A2 activity finalize on 6.25.2015 08:00 hours.


Other problem:


Hi,

Thank you for contacting Aspose support team.

I have tried to re-produce the issue using following sample code:

String path = "Task634609";
SimpleDateFormat sdf = new SimpleDateFormat("dd-M-yyyy hh:mm:ss");

String dateInString = "";

Date date = null;
try
{
dateInString = "01-06-2015 08:00:00";
date = sdf.parse(dateInString);
}
catch (ParseException e)
{e.printStackTrace();}

Project project = new Project();

project.set(Prj.START_DATE, date);

Task pred = project.getRootTask().getChildren().add("Task 1");
try {
dateInString = "25-06-2015 08:00:00";
date = sdf.parse(dateInString);
}
catch (ParseException e) {e.printStackTrace();}

pred.set(Tsk.START, date);

Task succ = project.getRootTask().getChildren().add("Task 2");
TaskLink link = project.getTaskLinks().add(pred, succ);
link.setLinkType(TaskLinkType.StartToFinish);

project.save(path + "Output.xml", SaveFileFormat.XML);

Here the same dates are used as per your scenario, however got the same results as by MS Project. Could you please test the above mentioned sample code using Aspose.Tasks for Java 8.4.0 and let us know the feedback?

Hi,


I make test units for re-produce the issue using 8.4.0 version:

public void testSFwithWeekEnd() throws ParseException {
Project project = new Project();
Task rootTask = project.getRootTask();
DateFormat DF_DDMMYYYY_HHMM = new SimpleDateFormat(“dd/MM/yyyy HH:mm”);
Task task1 = rootTask.getChildren().add(“Task 1”);
task1.set(Tsk.START, DF_DDMMYYYY_HHMM.parse(“03/11/2014 08:00”));
task1.set(Tsk.FINISH, DF_DDMMYYYY_HHMM.parse(“03/11/2014 17:00”));
task1.set(Tsk.DURATION, project.getDuration(1d));
Task task2 = rootTask.getChildren().add(“Task 2”);
task2.set(Tsk.START, DF_DDMMYYYY_HHMM.parse(“01/01/2014 08:00”));
task2.set(Tsk.FINISH, DF_DDMMYYYY_HHMM.parse(“01/01/2014 17:00”));
task2.set(Tsk.DURATION, project.getDuration(1d));
project.getTaskLinks().add(task1, task2, TaskLinkType.StartToFinish);
Assert.assertEquals(DF_DDMMYYYY_HHMM.parse(“31/10/2014 08:00”), task2.get(Tsk.START));
Assert.assertEquals(DF_DDMMYYYY_HHMM.parse(“03/11/2014 08:00”), task2.get(Tsk.FINISH));
}
Result: java.lang.AssertionError: expected:<Mon Nov 03 08:00:00 BRST 2014> but was:<Fri Oct 31 17:00:00 BRST 2014>

public void testSFwithoutWeekEnd() throws ParseException {
Project project = new Project();
Task rootTask = project.getRootTask();
DateFormat DF_DDMMYYYY_HHMM = new SimpleDateFormat(“dd/MM/yyyy HH:mm”);
Task task3 = rootTask.getChildren().add(“Task 3”);
task3.set(Tsk.START, DF_DDMMYYYY_HHMM.parse(“04/11/2014 08:00”));
task3.set(Tsk.FINISH, DF_DDMMYYYY_HHMM.parse(“04/11/2014 17:00”));
task3.set(Tsk.DURATION, project.getDuration(1d));
Task task4 = rootTask.getChildren().add(“Task 4”);
task4.set(Tsk.START, DF_DDMMYYYY_HHMM.parse(“01/01/2014 08:00”));
task4.set(Tsk.FINISH, DF_DDMMYYYY_HHMM.parse(“01/01/2014 17:00”));
task4.set(Tsk.DURATION, project.getDuration(1d));
project.getTaskLinks().add(task3, task4, TaskLinkType.StartToFinish);
Assert.assertEquals(DF_DDMMYYYY_HHMM.parse(“03/11/2014 08:00”), task4.get(Tsk.START));
Assert.assertEquals(DF_DDMMYYYY_HHMM.parse(“04/11/2014 08:00”), task4.get(Tsk.FINISH));
}

java.lang.AssertionError: expected:<Tue Nov 04 08:00:00 BRST 2014> but was:<Mon Nov 03 17:00:00 BRST 2014>

Hi,


I was able to re-produce the scenario using above example code and have logged it in our bug tracking system under Id:TASKS-34071 for further investigation by the product team. I shall write here as soon as some feedback is received in this regard.

The issues you have found earlier (filed as TASKS-34071) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.