[Bug #1237] Fix problem with progress bar size
Now it takes into account the decimals when calculating the date for the progress bar position. FEA: ItEr75S04BugFixing
This commit is contained in:
parent
3c3ba781a7
commit
16acbd51b6
1 changed files with 15 additions and 4 deletions
|
|
@ -638,10 +638,21 @@ public class TaskElementAdapter {
|
|||
if (daysBetween == 0) {
|
||||
return calculateLimitDateWhenDaysBetweenAreZero(advancePercentage);
|
||||
}
|
||||
int daysAdvance = advancePercentage.multiply(
|
||||
new BigDecimal(daysBetween)).intValue();
|
||||
return GanttDate.createFrom(taskElement.getIntraDayStartDate()
|
||||
.getDate().plusDays(daysAdvance));
|
||||
BigDecimal daysAdvance = advancePercentage
|
||||
.multiply(new BigDecimal(daysBetween));
|
||||
int days = daysAdvance.intValue();
|
||||
|
||||
LocalDate advanceDate = taskElement.getStartAsLocalDate()
|
||||
.plusDays(days);
|
||||
EffortDuration capacity = calendar.getCapacityOn(PartialDay
|
||||
.wholeDay(advanceDate));
|
||||
|
||||
int seconds = daysAdvance.subtract(new BigDecimal(days))
|
||||
.multiply(new BigDecimal(capacity.getSeconds()))
|
||||
.intValue();
|
||||
|
||||
return toGantt(IntraDayDate.create(advanceDate,
|
||||
EffortDuration.seconds(seconds)));
|
||||
}
|
||||
|
||||
private GanttDate calculateLimitDateWhenDaysBetweenAreZero(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue