Menu

#161 ResourceAssignment.getTaskUniqueID() returns null

closed-fixed
Jon Iles
None
5
2011-09-09
2011-07-14
No

I'm using the .NET assembly version 4.2.0.0.to process an XML created by MS Project 2007.

The folllwing code throws an exception for me:
// Locate the existing task and Resource
net.sf.mpxj.Task task = _project.getTaskByUniqueID(java.lang.Integer.valueOf(intTaskUID));
net.sf.mpxj.Resource resource = _project.getResourceByUniqueID(java.lang.Integer.valueOf(intResourceUID));

// Create a new resource assignment
net.sf.mpxj.ResourceAssignment resourceAssignment = task.addResourceAssignment(resource);

java.lang.Integer taskUID = resourceAssignment.getTaskUniqueID();
Assert.assertNotNull(taskUID);

I have verified that the task and the resource each have valid UniqueID values.

I can work around this, by getting the UniqueID from the task and setting it on the resourceAssignment.

Additional Info:
Both the Task and the Resource we created during the execution of my program.

Discussion

  • Jon Iles

    Jon Iles - 2011-09-09
    • labels: 490334 -->
    • assigned_to: nobody --> joniles
     
  • Jon Iles

    Jon Iles - 2011-09-09

    I've added a change which should fix this. I'll check it in to CVS tonight.

    Jon

     
  • Jon Iles

    Jon Iles - 2011-09-09
    • status: open --> closed-fixed
     
  • Jon Iles

    Jon Iles - 2011-09-09

    The code to fix this is now in CVS.

     

Log in to post a comment.

MongoDB Logo MongoDB