LibrePlan / libreplan

LibrePlan - Open Web Planning
https://www.libreplan.dev
GNU Affero General Public License v3.0
289 stars 170 forks source link

Bug in advance consolidation #619

Closed kwoot closed 6 years ago

kwoot commented 14 years ago

(Original Bugzilla Bug ID: 475)

Date: 2010-05-31 21:58:39 From: Javier Morán \<jmoran@igalia.com> To: Manuel Rego Casasnovas \<rego@igalia.com> Version: navalplan-1.0 (1.0.x) Duplicate: 483) Last updated: 2011-01-18 17:51:49


(Note: this issue was migrated automatically with bugzilla2github.py tool )

kwoot commented 6 years ago

Bugzilla Comment ID: 1095 Date: 2010-06-01 09:50:48 From: Manuel Rego Casasnovas \<rego@igalia.com>

commit cd8c393a84f351cc54c46accda6cf4ec0532fd48 Author: Manuel Rego Casasnovas mrego@igalia.com Date: Tue Jun 1 09:48:10 2010 +0200

ItEr59S04ValidacionEProbasFuncionaisItEr58S04: [Bug #475] Fixed advance consolidation reassignments when consolidated date is before task start date.
kwoot commented 6 years ago

Bugzilla Comment ID: 1093 Date: 2010-05-31 21:58:39 From: Javier Morán \<jmoran@igalia.com>

If the date to consolidate the advance is before the beginning of the task i was specified that:

" Data anterior a data de inicio: Non se marca ningún dia como consolidado e se reasigna a partires da data de inicio que ten a tarefa. "

However, day assigments are assigned before the beginning of the task as if was a general case.

kwoot commented 6 years ago

Bugzilla Comment ID: 1097 Date: 2010-06-02 10:45:10 From: Javier Morán \<jmoran@igalia.com>

With the attached dump if you go to the order "construccion barco de recreo" and you try to consolidate the advance with date "19/05/2010" you get the following error:

02-jun-2010 10:40:16 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1131 GRAVE: >>java.lang.IllegalArgumentException: The validated expression is false

at org.apache.commons.lang.Validate.isTrue(Validate.java:181) at org.navalplanner.business.planner.entities.ResourceAllocation$AssignmentsAllocation.createAssignments(ResourceAllocation.java:522) at org.navalplanner.business.planner.entities.ResourceAllocation$AssignmentsAllocation.allocate(ResourceAllocation.java:514) at org.navalplanner.business.planner.entities.ResourceAllocation$AssignmentsAllocation.access$0(ResourceAllocation.java:508) at org.navalplanner.business.planner.entities.ResourceAllocation$AssignmentsAllocation$AllocateHoursOnInterval.allocateHours(ResourceAllocation.java:479) at org.navalplanner.web.planner.consolidations.AdvanceConsolidationModel.reassign(AdvanceConsolidationModel.java:254) ... 523346 [509922381@qtp-2056063759-5] ERROR org.navalplanner.web.error.PageForErrorOnEvent - The validated expression is false java.lang.IllegalArgumentException: The validated expression is false at org.apache.commons.lang.Validate.isTrue(Validate.java:181) at org.navalplanner.business.planner.entities.ResourceAllocation$AssignmentsAllocation.createAssignments(ResourceAllocation.java:522) at org.navalplanner.business.planner.entities.ResourceAllocation$AssignmentsAllocation.allocate(ResourceAllocation.java:514) at org.navalplanner.business.planner.entities.ResourceAllocation$AssignmentsAllocation.access$0(ResourceAllocation.java:508) at org.navalplanner.business.planner.entities.ResourceAllocation$AssignmentsAllocation$AllocateHoursOnInterval.allocateHours(ResourceAllocation.java:479) at org.navalplanner.web.planner.consolidations.AdvanceConsolidationModel.reassign(AdvanceConsolidationModel.java:254) at org.navalplanner.web.planner.consolidations.AdvanceConsolidationModel.addConsolidatedValue(AdvanceConsolidationModel.java:238) at org.navalplanner.web.planner.consolidations.AdvanceConsolidationModel.addConsolidationIfIsNeeded(AdvanceConsolidationModel.java:189) at org.navalplanner.web.planner.consolidations.AdvanceConsolidationModel.accept(AdvanceConsolidationModel.java:145) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy132.accept(Unknown Source) at org.navalplanner.web.planner.consolidations.AdvanceConsolidationController.accept(AdvanceConsolidationController.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:119) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:310) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:787) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:176) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:493) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:425)

kwoot commented 6 years ago

Bugzilla Comment ID: 1100 Date: 2010-06-02 18:33:05 From: Manuel Rego Casasnovas \<rego@igalia.com>

This last comment is not related with this bug, so I new bug was created #478.

Another problem was detected, in that case adding an advance after the end date in the order "construccion barco de competición en acero" for the task "montaje de andamios".

Moreover, if you consolidated for example and advance of 75% the 16 July. You click Accept, but you don't save. You wouldn't be able to access the order again. Some changes in DayAssignments information are changed on database, this is wrong.

kwoot commented 6 years ago

Bugzilla Comment ID: 1101 Date: 2010-06-02 19:00:22 From: Manuel Rego Casasnovas \<rego@igalia.com>

SEVERE: >>java.lang.NullPointerException

at org.navalplanner.business.planner.entities.GenericDayAssignment.belongsTo(GenericDayAssignment.java:91) at org.navalplanner.business.resources.entities.Resource.getAssignedHoursDiscounting(Resource.java:766) at org.navalplanner.business.planner.entities.AssignedHoursDiscounting.getAssignedHoursAt(AssignedHoursDiscounting.java:36) at org.navalplanner.business.planner.entities.HoursDistributor.divisionAt(HoursDistributor.java:230) at org.navalplanner.business.planner.entities.HoursDistributor.distributeForDay(HoursDistributor.java:158) at org.navalplanner.business.planner.entities.GenericResourceAllocation$GenericAllocation.distributeForDay(GenericResourceAllocation.java:198) ... 135682 [163368@qtp-28868898-7] ERROR org.navalplanner.web.error.PageForErrorOnEvent - Unknown exception: java.lang.NullPointerException. java.lang.NullPointerException at org.navalplanner.business.planner.entities.GenericDayAssignment.belongsTo(GenericDayAssignment.java:91) at org.navalplanner.business.resources.entities.Resource.getAssignedHoursDiscounting(Resource.java:766) at org.navalplanner.business.planner.entities.AssignedHoursDiscounting.getAssignedHoursAt(AssignedHoursDiscounting.java:36) at org.navalplanner.business.planner.entities.HoursDistributor.divisionAt(HoursDistributor.java:230) at org.navalplanner.business.planner.entities.HoursDistributor.distributeForDay(HoursDistributor.java:158) at org.navalplanner.business.planner.entities.GenericResourceAllocation$GenericAllocation.distributeForDay(GenericResourceAllocation.java:198) at org.navalplanner.business.planner.entities.GenericResourceAllocation.createAssignmentsAtDay(GenericResourceAllocation.java:299) at org.navalplanner.business.planner.entities.allocationalgorithms.ResourcesPerDayModification$OnGenericAllocation.createAssignmentsAtDay(ResourcesPerDayModification.java:75) at org.navalplanner.business.planner.entities.ResourceAllocation$AllocationsCurried$1.createAssignmentsAtDay(ResourceAllocation.java:203) at org.navalplanner.business.planner.entities.allocationalgorithms.AllocatorForSpecifiedResourcesPerDayAndHours.assignForDay(AllocatorForSpecifiedResourcesPerDayAndHours.java:125) at org.navalplanner.business.planner.entities.allocationalgorithms.AllocatorForSpecifiedResourcesPerDayAndHours.untilAllocating(AllocatorForSpecifiedResourcesPerDayAndHours.java:89) at org.navalplanner.business.planner.entities.allocationalgorithms.AllocatorForSpecifiedResourcesPerDayAndHours.untilAllocating(AllocatorForSpecifiedResourcesPerDayAndHours.java:67) at org.navalplanner.business.planner.entities.ResourceAllocation$AllocationsCurried.untilAllocating(ResourceAllocation.java:243) at org.navalplanner.business.planner.entities.Task.reassign(Task.java:468) at org.navalplanner.business.planner.entities.Task.moveAllocations(Task.java:432) at org.navalplanner.business.planner.entities.TaskElement.moveTo(TaskElement.java:213) at org.navalplanner.web.planner.TaskElementAdapter$TaskElementWrapper.setBeginDateInsideTransaction(TaskElementAdapter.java:191) at org.navalplanner.web.planner.TaskElementAdapter$TaskElementWrapper.access$1(TaskElementAdapter.java:190) at org.navalplanner.web.planner.TaskElementAdapter$TaskElementWrapper$1.execute(TaskElementAdapter.java:155) at org.navalplanner.web.planner.TaskElementAdapter$TaskElementWrapper$1.execute(TaskElementAdapter.java:1) at org.navalplanner.business.common.AdHocTransactionService.runOnReadOnlyTransaction(AdHocTransactionService.java:116) at sun.reflect.GeneratedMethodAccessor402.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy208.runOnReadOnlyTransaction(Unknown Source) at org.navalplanner.web.planner.TaskElementAdapter$TaskElementWrapper.setBeginDate(TaskElementAdapter.java:151) at org.zkoss.ganttz.data.Task.setBeginDate(Task.java:196) at org.zkoss.ganttz.data.GanttDiagramGraph$GanttZKAdapter.setStartDateFor(GanttDiagramGraph.java:195) at org.zkoss.ganttz.data.GanttDiagramGraph$GanttZKAdapter.setStartDateFor(GanttDiagramGraph.java:1) at org.zkoss.ganttz.data.GanttDiagramGraph$Recalculation.enforceStartDate(GanttDiagramGraph.java:1014) at org.zkoss.ganttz.data.GanttDiagramGraph$Recalculation.enforceStartAndEnd(GanttDiagramGraph.java:975) at org.zkoss.ganttz.data.GanttDiagramGraph$Recalculation.taskChangesPosition(GanttDiagramGraph.java:950) at org.zkoss.ganttz.data.GanttDiagramGraph$Recalculation.doRecalculation(GanttDiagramGraph.java:937) at org.zkoss.ganttz.data.GanttDiagramGraph$DependenciesEnforcer.doRecalculations(GanttDiagramGraph.java:735) at org.zkoss.ganttz.data.GanttDiagramGraph$DependenciesEnforcer.access$4(GanttDiagramGraph.java:732) at org.zkoss.ganttz.data.GanttDiagramGraph$DependenciesEnforcer$8.doAction(GanttDiagramGraph.java:727) at org.zkoss.ganttz.data.GanttDiagramGraph$DependenciesEnforcer$6.doAction(GanttDiagramGraph.java:684) at org.zkoss.ganttz.util.PreAndPostNotReentrantActionsWrapper.executeWithPreAndPostActions(PreAndPostNotReentrantActionsWrapper.java:49) at org.zkoss.ganttz.util.PreAndPostNotReentrantActionsWrapper.doAction(PreAndPostNotReentrantActionsWrapper.java:41) at org.zkoss.ganttz.data.GanttDiagramGraph$DependenciesEnforcer.onNewEntrance(GanttDiagramGraph.java:674) at org.zkoss.ganttz.data.GanttDiagramGraph$DependenciesEnforcer.access$3(GanttDiagramGraph.java:673) at org.zkoss.ganttz.data.GanttDiagramGraph$DependenciesEnforcer$5.ifNewEntrance(GanttDiagramGraph.java:668) at org.zkoss.ganttz.data.ReentranceGuard.entranceRequested(GanttDiagramGraph.java:1367) at org.zkoss.ganttz.data.GanttDiagramGraph$DependenciesEnforcer.executeWithPreAndPostActionsOnlyIfNewEntrance(GanttDiagramGraph.java:659) at org.zkoss.ganttz.data.GanttDiagramGraph$DependenciesEnforcer.taskPositionModified(GanttDiagramGraph.java:723) at org.zkoss.ganttz.data.GanttDiagramGraph$DependenciesEnforcer.access$1(GanttDiagramGraph.java:722) at org.zkoss.ganttz.data.GanttDiagramGraph.enforceRestrictions(GanttDiagramGraph.java:1103) at org.zkoss.ganttz.data.GanttDiagramGraph.add(GanttDiagramGraph.java:1099) at org.zkoss.ganttz.FunctionalityExposedForExtensions.add(FunctionalityExposedForExtensions.java:254) at org.zkoss.ganttz.FunctionalityExposedForExtensions.add(FunctionalityExposedForExtensions.java:271) at org.zkoss.ganttz.Planner.setConfiguration(Planner.java:280) at org.navalplanner.web.planner.order.OrderPlanningModel.setConfigurationToPlanner(OrderPlanningModel.java:319) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy259.setConfigurationToPlanner(Unknown Source) at org.navalplanner.web.planner.order.OrderPlanningController.updateConfiguration(OrderPlanningController.java:184) at org.navalplanner.web.planner.order.OrderPlanningController.setOrder(OrderPlanningController.java:129) at org.navalplanner.web.planner.tabs.PlanningTabCreator$4.afterShowAction(PlanningTabCreator.java:193) at org.navalplanner.web.planner.tabs.CreatedOnDemandTab.show(CreatedOnDemandTab.java:77) at org.navalplanner.web.planner.tabs.TabOnModeType.changeTab(TabOnModeType.java:90) at org.navalplanner.web.planner.tabs.TabOnModeType.access$1(TabOnModeType.java:86) at org.navalplanner.web.planner.tabs.TabOnModeType$1.typeChanged(TabOnModeType.java:79) at org.navalplanner.web.planner.tabs.Mode.fireModeTypeChanged(Mode.java:88) at org.navalplanner.web.planner.tabs.Mode.changeTo(Mode.java:79) at org.navalplanner.web.planner.tabs.Mode.goToOrderMode(Mode.java:68) at org.navalplanner.web.planner.tabs.PlanningTabCreator$1$1.doAction(PlanningTabCreator.java:122) at org.navalplanner.web.planner.tabs.PlanningTabCreator$1$1.doAction(PlanningTabCreator.java:1) at org.zkoss.ganttz.CommandOnTaskContextualized.doAction(CommandOnTaskContextualized.java:71) at org.zkoss.ganttz.CommandOnTaskContextualized.doAction(CommandOnTaskContextualized.java:56) at org.zkoss.ganttz.TaskList$1.onEvent(TaskList.java:169) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:197) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:493) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:425)

kwoot commented 6 years ago

Bugzilla Comment ID: 1102 Date: 2010-06-02 19:16:35 From: Manuel Rego Casasnovas \<rego@igalia.com>

commit 9172682339a5e638f83ebf06f5ada6961a05ae94 Author: Manuel Rego Casasnovas mrego@igalia.com Date: Wed Jun 2 18:23:19 2010 +0200

ItEr59S04ValidacionEProbasFuncionaisItEr58S04: [Bug #475] Fixed problem consolidating and advance after the end of the task.
kwoot commented 6 years ago

Bugzilla Comment ID: 1098 Date: 2010-06-02 10:45:49 From: Javier Morán \<jmoran@igalia.com>


Attached file: dump.sql.gz File description: database dump

kwoot commented 6 years ago

Bugzilla Comment ID: 1118 Date: 2010-06-08 08:44:27 From: Manuel Rego Casasnovas \<rego@igalia.com>

commit 515e9e889f87f639e9eb6075d5da609cc59c21c2 Author: Manuel Rego Casasnovas mrego@igalia.com Date: Fri Jun 4 09:05:29 2010 +0200

 ItEr59S04ValidacionEProbasFuncionaisItEr58S04: [Bug #475] Fixed bug when reallocating resources after consolidation with a day before the start of the task.
kwoot commented 6 years ago

Bugzilla Comment ID: 1120 Date: 2010-06-08 09:39:17 From: Manuel Rego Casasnovas \<rego@igalia.com>