Menu

#276 PrimaveraPMFileReader does not read PercentageComplete

v1.0_(example)
closed-fixed
Jon Iles
None
3
2015-11-12
2015-09-04
No

PrimaveraPMFileReader throws exception on reader.read, because the field PercentageComplete is null, even though it obviously is in the input file (see attached file). the input file I exported before with PrimaveraPMFileWriter! also see attached screenshots of exception in Netbeans IDE.

  AbstractProjectReader reader = new PrimaveraPMFileReader();
  ProjectFile projectFile = reader.read(inputFile);

Exception occurs in PrimaveraPMFileReader.java
Line 463: task.setPercentageComplete(NumberHelper.getDouble(row.getPercentComplete().doubleValue() * 100.0));

because row.getPercentComplete() delivers null

3 Attachments

Discussion

  • Raimund Neumüller

    It seems for me that the problem is that on export in PrimaveraPMFileWriter you write "DurationPercentComplete":
    line 433: xml.setDurationPercentComplete(getPercentage(mpxj.getPercentageComplete()));

    BUT on import on PrimaveraPMFileReader you read "PercentageComplete"
    line 464: task.setPercentageComplete(NumberHelper.getDouble(row.getPercentComplete().doubleValue() * 100.0));

    which is null because on export before only "DurationPercentComplete" was written

    If I would change the line in reader to row.getDurationPercentComplete() instead of row.getPercentComplete(), it would read something (I m not sure if this is the correct solution)

     
  • Jon Iles

    Jon Iles - 2015-11-12
    • status: open --> closed-fixed
     
  • Jon Iles

    Jon Iles - 2015-11-12

    I've updated the code in git to use duratio percent complete consistently. This should resolve the issue you reported.

     

Log in to post a comment.

MongoDB Logo MongoDB