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)
|
@Column(nullable=false)
|
||||||
private long estimatedTimeConsumption = 0;
|
private long estimatedTimeConsumption = 0;
|
||||||
|
|
||||||
|
@Column(nullable=false)
|
||||||
|
private int daysOffset;
|
||||||
|
|
||||||
@Column(nullable=false)
|
@Column(nullable=false)
|
||||||
private boolean requireHandIn = false;
|
private boolean requireHandIn = false;
|
||||||
|
|
||||||
@ -46,6 +49,10 @@ public class ProjectEventTemplate extends DomainObject implements Comparable<Pro
|
|||||||
|
|
||||||
public ProjectEventTemplate(){}
|
public ProjectEventTemplate(){}
|
||||||
|
|
||||||
|
public ProjectEventTemplate(int daysOffset){
|
||||||
|
this.daysOffset = daysOffset;
|
||||||
|
}
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -53,6 +60,14 @@ public class ProjectEventTemplate extends DomainObject implements Comparable<Pro
|
|||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setdaysOffset(int daysOffset){
|
||||||
|
this.daysOffset = daysOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDaysOffset(){
|
||||||
|
return daysOffset;
|
||||||
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return title;
|
return title;
|
||||||
|
@ -38,6 +38,7 @@ public class TemplateGenerator { //based on ScheduleGenerator
|
|||||||
|
|
||||||
private int templateEstimatedDays = 0;
|
private int templateEstimatedDays = 0;
|
||||||
private int durationInDays = 0;
|
private int durationInDays = 0;
|
||||||
|
private int daysOffset;
|
||||||
|
|
||||||
private DateMidnight startDate;
|
private DateMidnight startDate;
|
||||||
|
|
||||||
@ -58,10 +59,6 @@ public class TemplateGenerator { //based on ScheduleGenerator
|
|||||||
}else{
|
}else{
|
||||||
this.startDate = new DateMidnight(projectEvents.first().getDueDate());
|
this.startDate = new DateMidnight(projectEvents.first().getDueDate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ScheduleTemplate generate(){
|
public ScheduleTemplate generate(){
|
||||||
@ -93,7 +90,7 @@ public class TemplateGenerator { //based on ScheduleGenerator
|
|||||||
pet.setNumberInOrder(counter);
|
pet.setNumberInOrder(counter);
|
||||||
pet.setRequireHandIn(pe.isRequireHandIn());
|
pet.setRequireHandIn(pe.isRequireHandIn());
|
||||||
pet.setScheduleTemplate(template);
|
pet.setScheduleTemplate(template);
|
||||||
|
måste få in daysOffset i projectEventTemplate
|
||||||
|
|
||||||
datePointer = datePointer.plusDays(durationInDays);
|
datePointer = datePointer.plusDays(durationInDays);
|
||||||
templateEstimatedDays += durationInDays;
|
templateEstimatedDays += durationInDays;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user