Adds functionality to import the deadline
FEA: ItEr77S05BasicProjectImport
This commit is contained in:
parent
b772c694fb
commit
d3361ac0c9
4 changed files with 20 additions and 0 deletions
|
|
@ -114,6 +114,10 @@ public class MPXJProjectFileConversor {
|
|||
|
||||
importData.startDate = header.getStartDate();
|
||||
|
||||
// MPXJ don't provide a deadline for the project so we take the finish
|
||||
// date
|
||||
importData.deadline = header.getFinishDate();
|
||||
|
||||
for (Task task : file.getChildTasks()) {
|
||||
// Projects are represented as a level 0 task with all
|
||||
// real task as its children. Ignore all other top level tasks.
|
||||
|
|
@ -209,6 +213,8 @@ public class MPXJProjectFileConversor {
|
|||
|
||||
importTask.totalHours = durationToIntHours(task.getDuration(), header);
|
||||
|
||||
importTask.deadline = task.getDeadline();
|
||||
|
||||
return importTask;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@ public class OrderDTO {
|
|||
*/
|
||||
public Date startDate;
|
||||
|
||||
/**
|
||||
* Deadline of the project
|
||||
*/
|
||||
public Date deadline;
|
||||
|
||||
/**
|
||||
* Order created with this data
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -49,6 +49,11 @@ public class OrderElementDTO {
|
|||
*/
|
||||
public Date endDate;
|
||||
|
||||
/**
|
||||
* end date of the task
|
||||
*/
|
||||
public Date deadline;
|
||||
|
||||
/**
|
||||
* Order created with this data
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -183,6 +183,8 @@ public class OrderImporterMPXJ implements IOrderImporter {
|
|||
|
||||
orderElement.setInitDate(project.startDate);
|
||||
|
||||
orderElement.setDeadline(project.deadline);
|
||||
|
||||
((Order) orderElement).calculateAndSetTotalHours();
|
||||
|
||||
project.order = (Order) orderElement;
|
||||
|
|
@ -242,6 +244,8 @@ public class OrderImporterMPXJ implements IOrderImporter {
|
|||
|
||||
orderElement.setName(task.name);
|
||||
|
||||
orderElement.setDeadline(task.deadline);
|
||||
|
||||
task.orderElement = orderElement;
|
||||
|
||||
return orderElement;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue