LibrePlan / libreplan

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

Restriction "start in fixed date" launches error #873

Closed kwoot closed 6 years ago

kwoot commented 13 years ago

(Original Bugzilla Bug ID: 729)

Date: 2010-11-17 16:44:44 From: Xavi Castaño \<xcastanho@igalia.com> To: Oscar González \<ogonzalez@igalia.com> Version: navalplan-1.0 (1.0.x) Last updated: 2011-01-18 17:50:48


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

kwoot commented 6 years ago

Bugzilla Comment ID: 1803 Date: 2010-11-17 16:44:44 From: Xavi Castaño \<xcastanho@igalia.com>

I am not sure if I will be able to reproduce it (I don't have enough time today for repeating bugs).

what I did:

Run-time error: The validated expression is false . Error was registered and it will be fixed as soon as possible.

17-Nov-2010 16:31:37 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1130 SEVERE: >>java.lang.IllegalArgumentException: The validated expression is false

at org.apache.commons.lang.Validate.isTrue(Validate.java:181) at org.navalplanner.business.workingday.IntraDayDate.numberOfDaysUntil(IntraDayDate.java:300) at org.navalplanner.business.planner.entities.Task.calculateEndKeepingLength(Task.java:469) at org.navalplanner.business.planner.entities.Task.calculateNewEndGiven(Task.java:463) at org.navalplanner.business.planner.entities.TaskElement.moveTo(TaskElement.java:272) at org.navalplanner.web.planner.TaskElementAdapter$TaskElementWrapper$1.execute(TaskElementAdapter.java:352) ... 483528 [354989893@qtp-1944239527-8] 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.workingday.IntraDayDate.numberOfDaysUntil(IntraDayDate.java:300) at org.navalplanner.business.planner.entities.Task.calculateEndKeepingLength(Task.java:469) at org.navalplanner.business.planner.entities.Task.calculateNewEndGiven(Task.java:463) at org.navalplanner.business.planner.entities.TaskElement.moveTo(TaskElement.java:272) at org.navalplanner.web.planner.TaskElementAdapter$TaskElementWrapper$1.execute(TaskElementAdapter.java:352) at org.navalplanner.web.planner.TaskElementAdapter$TaskElementWrapper$1.execute(TaskElementAdapter.java:348) at org.navalplanner.business.common.AdHocTransactionService.runOnReadOnlyTransaction(AdHocTransactionService.java:116) at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) 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 $Proxy55.runOnReadOnlyTransaction(Unknown Source) at org.navalplanner.web.planner.TaskElementAdapter$TaskElementWrapper.setBeginDate(TaskElementAdapter.java:347) at org.zkoss.ganttz.data.Task.setBeginDate(Task.java:162) at org.zkoss.ganttz.TaskEditFormComposer.copyFromDTO(TaskEditFormComposer.java:110) at org.zkoss.ganttz.TaskEditFormComposer.accept(TaskEditFormComposer.java:74) at org.navalplanner.web.planner.taskedition.TaskPropertiesController.accept(TaskPropertiesController.java:403) at org.navalplanner.web.planner.taskedition.EditTaskController.accept(EditTaskController.java:282) 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:797) 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:519) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:446)

kwoot commented 6 years ago

Bugzilla Comment ID: 1805 Date: 2010-11-17 16:58:06 From: Javier Morán \<jmoran@igalia.com>

I think it happens with all the tasks.

kwoot commented 6 years ago

Bugzilla Comment ID: 1810 Date: 2010-11-17 17:08:32 From: Oscar González \<ogonzalez@igalia.com>

Tonight I'm pushing some changes related to scheduling. I will check this error and if it keeps on happening I will fix it.

kwoot commented 6 years ago

Bugzilla Comment ID: 1827 Date: 2010-11-17 20:56:29 From: Oscar González \<ogonzalez@igalia.com>

The error can be reproduced without doing allocations or adding any dependency. Just put a start date in the constraint that is posterior to the current end.

kwoot commented 6 years ago

Bugzilla Comment ID: 1828 Date: 2010-11-17 22:14:08 From: Oscar González \<ogonzalez@igalia.com>

commit 4e77db8965eb6d99ca3362aa2084166d90fc8d6f Author: Óscar González Fernández ogonzalez@igalia.com Date: Wed Nov 17 21:48:25 2010 +0100

[Bug #729] Fix bug

The problem lies in that the startContraintDate was being written to
the start date of the task directly. So, the start date was set to the
specified date without the end date being recalculated. This could
leave the task in an inconsistent state, with an end date prior to the
start date.

The solution is to simply not update directly the task start date with
the constraint date.

FEA: ItEr63S03BugFixing
kwoot commented 6 years ago

Bugzilla Comment ID: 1831 Date: 2010-11-18 12:52:04 From: Javier Morán \<jmoran@igalia.com>

If you do the following steps in the attached dump you get the same error:

1) go to the order scheduling "pedido 7" 2) add to the task elem 1 the restriction START_IN_FIXED_DAY 1 December 2010. 3) drag the task and drop it in, for instance, in the 18 December the 2010.

you get the stacktrace:

18-nov-2010 12:42:06 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1130 GRAVE: >>java.lang.IllegalArgumentException: The validated expression is false

at org.apache.commons.lang.Validate.isTrue(Validate.java:181) at org.navalplanner.business.workingday.IntraDayDate.numberOfDaysUntil(IntraDayDate.java:300) at org.navalplanner.business.planner.entities.Task.calculateEndKeepingLength(Task.java:469) at org.navalplanner.business.planner.entities.Task.calculateNewEndGiven(Task.java:463) at org.navalplanner.business.planner.entities.TaskElement.moveTo(TaskElement.java:272) at org.navalplanner.web.planner.TaskElementAdapter$TaskElementWrapper$1.execute(TaskElementAdapter.java:352) ...

kwoot commented 6 years ago

Bugzilla Comment ID: 1833 Date: 2010-11-18 14:31:32 From: Oscar González \<ogonzalez@igalia.com>

commit a173fa16517c01bcaf26125b05ea3fff4ccb50b6 Author: Óscar González Fernández ogonzalez@igalia.com Date: Thu Nov 18 14:11:51 2010 +0100

[Bug #729] Fix bug

The problem persisted because the dates were being copied directly
from TaskDTO. Now this is avoided.

FEA: ItEr63S03BugFixing
kwoot commented 6 years ago

Bugzilla Comment ID: 1832 Date: 2010-11-18 12:52:43 From: Javier Morán \<jmoran@igalia.com>


Attached file: dump.sql File description: database dump