added daysOffset to projecteventtemplate
This commit is contained in:
parent
816f29ee28
commit
3b25bed168
src/main/java/se/su/dsv/scipro
@ -38,6 +38,9 @@ public class ProjectEventTemplate extends DomainObject implements Comparable<Pro
|
||||
@Column(nullable=false)
|
||||
private long estimatedTimeConsumption = 0;
|
||||
|
||||
@Column(nullable=false)
|
||||
private int daysOffset;
|
||||
|
||||
@Column(nullable=false)
|
||||
private boolean requireHandIn = false;
|
||||
|
||||
@ -46,6 +49,10 @@ public class ProjectEventTemplate extends DomainObject implements Comparable<Pro
|
||||
|
||||
public ProjectEventTemplate(){}
|
||||
|
||||
public ProjectEventTemplate(int daysOffset){
|
||||
this.daysOffset = daysOffset;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
@ -53,6 +60,14 @@ public class ProjectEventTemplate extends DomainObject implements Comparable<Pro
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setdaysOffset(int daysOffset){
|
||||
this.daysOffset = daysOffset;
|
||||
}
|
||||
|
||||
public int getDaysOffset(){
|
||||
return daysOffset;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
|
@ -38,6 +38,7 @@ public class TemplateGenerator { //based on ScheduleGenerator
|
||||
|
||||
private int templateEstimatedDays = 0;
|
||||
private int durationInDays = 0;
|
||||
private int daysOffset;
|
||||
|
||||
private DateMidnight startDate;
|
||||
|
||||
@ -58,10 +59,6 @@ public class TemplateGenerator { //based on ScheduleGenerator
|
||||
}else{
|
||||
this.startDate = new DateMidnight(projectEvents.first().getDueDate());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public ScheduleTemplate generate(){
|
||||
@ -93,7 +90,7 @@ public class TemplateGenerator { //based on ScheduleGenerator
|
||||
pet.setNumberInOrder(counter);
|
||||
pet.setRequireHandIn(pe.isRequireHandIn());
|
||||
pet.setScheduleTemplate(template);
|
||||
|
||||
måste få in daysOffset i projectEventTemplate
|
||||
|
||||
datePointer = datePointer.plusDays(durationInDays);
|
||||
templateEstimatedDays += durationInDays;
|
||||
|
Loading…
x
Reference in New Issue
Block a user