Menu

#266 Task Number fields not saved to file if the value would floor to zero

v1.0_(example)
closed-fixed
Jon Iles
None
5
2015-04-29
2015-04-13
Joe Pearce
No

The method writeExtendedAttribute in class MSPDIWriter checks if NUMERIC values of fields are zero, and if returns false so the caller does not write the field to the file.

The problem that the test uses the intValue method of Number, which for a Double returns 0 if the value is less than 1.0. Therefore, and field value (like task Number fields) that floor to zero are not written.

I expect the fix is change this line in MSPDIWriter.java

           write = (((Number) value).intValue() != 0);

to

           write = (((Number) value).doubleValue() != 0.0);

Discussion

  • Jon Iles

    Jon Iles - 2015-04-29
    • summary: Task Number fields not saved to file is the value would floor to zero --> Task Number fields not saved to file if the value would floor to zero
    • status: open --> closed-fixed
    • assigned_to: Jon Iles
     
  • Jon Iles

    Jon Iles - 2015-04-29

    Thanks for raising this. The code now in Git fixes this issue.

     

Log in to post a comment.

MongoDB Logo MongoDB