Skip to content

Commit

Permalink
P6 start and finish attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
joniles committed Dec 9, 2024
1 parent 298cf01 commit e8d8cfc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<action dev="joniles" type="update">To improve consistency, the methods `Task.getPrimaryResourceID()` and `Task.setPrimaryResourceID()` have been marked as deprecated. Use the new `Task.getPrimaryResourceUniqueID()` and `Task.setPrimaryResourceUniqueID()` methods instead.</action>
<action dev="joniles" type="update">Added the methods `Task.getPrimaryResource()` and `Task.setPrimaryResource()`.</action>
<action dev="joniles" type="update">Improved accuracy of retrieving the resource assignment GUID attribute when reading MPP files (Contributed by Fabian Schmidt).</action>
<action dev="joniles" type="update">Improve population of Task Start and Finish attributes when reading Primavera P6 schedules.</action>
</release>
<release date="2024-11-25" version="13.7.0">
<action dev="joniles" type="update">Update the MPXJ ruby gem to allow access to calendar data.</action>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1463,8 +1463,8 @@ private void processTasks(List<WBSType> wbs, Map<Integer, Notes> wbsNotes, List<
task.setFinish(row.getFinishDate());

// Note that planned finish is handled in the code below
populateField(task, TaskField.START, TaskField.START, TaskField.ACTUAL_START, TaskField.REMAINING_EARLY_START, TaskField.PLANNED_START);
populateField(task, TaskField.FINISH, TaskField.FINISH, TaskField.ACTUAL_FINISH, TaskField.REMAINING_EARLY_FINISH);
populateField(task, TaskField.START, TaskField.START, TaskField.ACTUAL_START, TaskField.REMAINING_EARLY_START, TaskField.PLANNED_START, TaskField.EARLY_START);
populateField(task, TaskField.FINISH, TaskField.FINISH, TaskField.ACTUAL_FINISH, TaskField.REMAINING_EARLY_FINISH, TaskField.EARLY_FINISH);

//
// We've tried the finish and actual finish fields... but we still have null.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -1155,8 +1155,8 @@ public void processTasks(List<Row> wbs, List<Row> tasks, Map<Integer, Notes> wbs
ProjectCalendar cal = m_project.getCalendarByUniqueID(calId);
task.setCalendar(cal);

populateField(task, TaskField.START, TaskField.ACTUAL_START, TaskField.REMAINING_EARLY_START, TaskField.PLANNED_START);
populateField(task, TaskField.FINISH, TaskField.ACTUAL_FINISH, TaskField.REMAINING_EARLY_FINISH, TaskField.PLANNED_FINISH);
populateField(task, TaskField.START, TaskField.ACTUAL_START, TaskField.REMAINING_EARLY_START, TaskField.PLANNED_START, TaskField.EARLY_START);
populateField(task, TaskField.FINISH, TaskField.ACTUAL_FINISH, TaskField.REMAINING_EARLY_FINISH, TaskField.PLANNED_FINISH, TaskField.EARLY_FINISH);

// Calculate actual duration
LocalDateTime actualStart = task.getActualStart();
Expand Down

0 comments on commit e8d8cfc

Please sign in to comment.