ItEr38S05ValidacionEProbasFuncionaisItEr37S06: [Bug #133] Use order calendar if TaskElement has not an assigned calendar.
This commit is contained in:
parent
3e213cdaf6
commit
bd8f5802a1
2 changed files with 16 additions and 0 deletions
|
|
@ -688,4 +688,16 @@ public abstract class OrderElement extends BaseEntity {
|
|||
return result;
|
||||
}
|
||||
|
||||
public Order getOrder() {
|
||||
if (this instanceof Order) {
|
||||
return (Order) this;
|
||||
}
|
||||
|
||||
if (parent != null) {
|
||||
return parent.getOrder();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -304,6 +304,10 @@ public abstract class TaskElement extends BaseEntity {
|
|||
}
|
||||
|
||||
public BaseCalendar getCalendar() {
|
||||
if (calendar == null) {
|
||||
return getOrderElement().getOrder().getCalendar();
|
||||
}
|
||||
|
||||
return calendar;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue