ItEr27S06CUAsignacionGrupoRecursosAPlanificacionItEr26S07: Renaming method to show better its meaning
This commit is contained in:
parent
62c8c41c28
commit
eb44deef87
5 changed files with 8 additions and 12 deletions
|
|
@ -53,7 +53,7 @@ public class Task extends TaskElement {
|
|||
return Collections.unmodifiableSet(this.hoursGroup.getCriterions());
|
||||
}
|
||||
|
||||
public Integer getHours() {
|
||||
public Integer getHoursSpecifiedAtOrder() {
|
||||
return hoursGroup.getWorkingHours();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ public class TaskTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void taskHasNumberOfHours() {
|
||||
assertThat(task.getHours(), equalTo(hoursGroup.getWorkingHours()));
|
||||
public void taskHasHoursSpecifiedAtOrderComingFromItsHoursGroup() {
|
||||
assertThat(task.getHoursSpecifiedAtOrder(), equalTo(hoursGroup.getWorkingHours()));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -201,13 +201,9 @@ public class ResourceAllocationController extends GenericForwardComposer {
|
|||
return StringUtils.join(criterionNames, ",");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns hours of {@link Task}
|
||||
* @return
|
||||
*/
|
||||
public String getTaskHours() {
|
||||
public String getOrderHours() {
|
||||
Task task = resourceAllocationModel.getTask();
|
||||
return (task != null && task.getHours() != null) ? task.getHours()
|
||||
return (task != null && task.getHoursSpecifiedAtOrder() != null) ? task.getHoursSpecifiedAtOrder()
|
||||
.toString() : "";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ public class ResourceAllocationModel implements IResourceAllocationModel {
|
|||
} else {
|
||||
LocalDate end = ResourceAllocation.allocating(resourceAllocations)
|
||||
.withResources(getResourcesMatchingCriterions())
|
||||
.untilAllocating(task.getHours());
|
||||
.untilAllocating(task.getHoursSpecifiedAtOrder());
|
||||
ganttTask.setEndDate(end.toDateTimeAtStartOfDay().toDate());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,9 +90,9 @@
|
|||
value="@{allocationController.taskCriterions}" />
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label value="${i18n:_('Hours')}:"
|
||||
<label value="${i18n:_('Order Hours')}:"
|
||||
style="font-weight:bold" />
|
||||
<label value="@{allocationController.taskHours}" />
|
||||
<label value="@{allocationController.orderHours}" />
|
||||
</hbox>
|
||||
</panelchildren>
|
||||
</panel>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue