Menu

#58 Task.getSplits() not consistent.

closed-fixed
Jon Iles
None
5
2008-10-29
2008-04-09
fcott
No

I am using mpxj-2.1.0 and POI 3.0.2

The documentation for Task.getSplits states that it returns null for a Task that is not a split task and a List<Duration> if the task is a split task.
I have found that sometimes the method returns a List<Duration> of size 0 if the Task is not a split Task and null on other occasions.

I have attached a project file containing 2 split tasks. When I tested this for split tasks the following output is generated

Task ... Task A
List<Duration> == 0
Task ... Task B
List<Duration> == 0
Task ... Task C
getSplits returning null for Task C
Task ... Task D
getSplits returning null for Task D
Task ... Task F
List<Duration> == 0
Task ... Task G
getSplits returning null for Task G
Task ... Task E
getSplits returning null for Task E
Task ... Task H
getSplits returning null for Task H
Task ... Task J
getSplits returning null for Task J
Task ... Task K
getSplits returning null for Task K
Task ... Task L
Debug ***************
Duration in Task L is 48.0
Duration in Task L is 56.0
Duration in Task L is 116.0
End Debug ***************
Task ... Task M
List<Duration> == 0
Task ... Task N
getSplits returning null for Task N
Task ... Task O
getSplits returning null for Task O
Task ... Task P
getSplits returning null for Task P
Task ... Task Q
List<Duration> == 0
Task ... Task R
getSplits returning null for Task R
Task ... Task S
Debug ***************
Duration in Task S is 48.0
Duration in Task S is 56.0
Duration in Task S is 112.0
End Debug ***************
Task ... Tast T
getSplits returning null for Tast T
Task ... Task V
List<Duration> == 0
Task ... Task Z
getSplits returning null for Task Z
Task ... Task W
getSplits returning null for Task W
Task ... Task X
getSplits returning null for Task X

Its seems that the level at which the Task is at is a factor in whether the getSplits function returns null or a List<Duration> of size 0

Thanks Fergal.

Discussion

  • fcott

    fcott - 2008-04-09
     
  • Jon Iles

    Jon Iles - 2008-04-14
    • assigned_to: nobody --> joniles
     
  • Jon Iles

    Jon Iles - 2008-10-29
    • status: open --> closed-fixed
     
  • Jon Iles

    Jon Iles - 2008-10-29

    Hi,

    the code in CVS now fixes this.

    Jon

     

Log in to post a comment.

MongoDB Logo MongoDB