You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2009/11/03 23:21:39 UTC
svn commit: r832581 - in
/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort:
ICalConverter.java WorkEffortServices.java
Author: adrianc
Date: Tue Nov 3 22:21:29 2009
New Revision: 832581
URL: http://svn.apache.org/viewvc?rev=832581&view=rev
Log:
Small fixup for last commit.
Modified:
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java?rev=832581&r1=832580&r2=832581&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java Tue Nov 3 22:21:29 2009
@@ -96,7 +96,7 @@
if (reminderStamp != null) {
alarm = new VAlarm(new DateTime(reminderStamp));
} else {
- TimeDuration duration = workEffortEventReminder.getDuration("reminderOffset");
+ TimeDuration duration = TimeDuration.fromNumber(workEffortEventReminder.getLong("reminderOffset"));
alarm = new VAlarm(new Dur(duration.days(), duration.hours(), duration.minutes(), duration.seconds()));
}
return alarm;
Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java?rev=832581&r1=832580&r2=832581&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java Tue Nov 3 22:21:29 2009
@@ -637,7 +637,7 @@
for (DateRange periodRange : periodRanges) {
if (periodRange.includesDate(occurrence)) {
GenericValue cloneWorkEffort = (GenericValue) workEffort.clone();
- TimeDuration duration = workEffort.getDuration("estimatedMilliSeconds");
+ TimeDuration duration = TimeDuration.fromNumber(workEffort.getLong("estimatedMilliSeconds"));
if (!duration.isZero()) {
Calendar endCal = UtilDateTime.toCalendar(occurrence, timeZone, locale);
Date endDate = duration.addToCalendar(endCal).getTime();
@@ -951,7 +951,7 @@
try {
parameters.put("eventDateTime", eventDateTime);
processEventReminder(ctx, reminder, parameters);
- TimeDuration duration = reminder.getDuration("repeatInterval");
+ TimeDuration duration = TimeDuration.fromNumber(reminder.getLong("repeatInterval"));
if ((repeatCount != 0 && currentCount + 1 >= repeatCount) || duration.isZero()) {
reminder.remove();
} else {
Re: svn commit: r832581 - in
/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort:
ICalConverter.java WorkEffortServices.java
Posted by Hans Bakker <ma...@antwebsystems.com>.
Hi Adrian
This commit breaks the calendar on the myportal main page with the
message:
---- exception report
----------------------------------------------------------
Service [getWorkEffortEventsByPeriod] threw an unexpected
exception/error
Exception: org.ofbiz.service.GenericServiceException
Message: Service [getWorkEffortEventsByPeriod] target threw an
unexpected exception (java.lang.Double cannot be cast to java.lang.Long)
---- cause
---------------------------------------------------------------------
Exception: java.lang.ClassCastException
Message: java.lang.Double cannot be cast to java.lang.Long
---- stack trace
---------------------------------------------------------------
java.lang.ClassCastException: java.lang.Double cannot be cast to
java.lang.Long
org.ofbiz.entity.GenericEntity.getLong(GenericEntity.java:642)
org.ofbiz.workeffort.workeffort.WorkEffortServices.getWorkEffortEventsByPeriod(WorkEffortServices.java:640)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
could you please have a look?
Thanks,
Hans
On Tue, 2009-11-03 at 22:21 +0000, adrianc@apache.org wrote:
> Author: adrianc
> Date: Tue Nov 3 22:21:29 2009
> New Revision: 832581
>
> URL: http://svn.apache.org/viewvc?rev=832581&view=rev
> Log:
> Small fixup for last commit.
>
> Modified:
> ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java
> ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
>
> Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java?rev=832581&r1=832580&r2=832581&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java (original)
> +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java Tue Nov 3 22:21:29 2009
> @@ -96,7 +96,7 @@
> if (reminderStamp != null) {
> alarm = new VAlarm(new DateTime(reminderStamp));
> } else {
> - TimeDuration duration = workEffortEventReminder.getDuration("reminderOffset");
> + TimeDuration duration = TimeDuration.fromNumber(workEffortEventReminder.getLong("reminderOffset"));
> alarm = new VAlarm(new Dur(duration.days(), duration.hours(), duration.minutes(), duration.seconds()));
> }
> return alarm;
>
> Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java?rev=832581&r1=832580&r2=832581&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java (original)
> +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java Tue Nov 3 22:21:29 2009
> @@ -637,7 +637,7 @@
> for (DateRange periodRange : periodRanges) {
> if (periodRange.includesDate(occurrence)) {
> GenericValue cloneWorkEffort = (GenericValue) workEffort.clone();
> - TimeDuration duration = workEffort.getDuration("estimatedMilliSeconds");
> + TimeDuration duration = TimeDuration.fromNumber(workEffort.getLong("estimatedMilliSeconds"));
> if (!duration.isZero()) {
> Calendar endCal = UtilDateTime.toCalendar(occurrence, timeZone, locale);
> Date endDate = duration.addToCalendar(endCal).getTime();
> @@ -951,7 +951,7 @@
> try {
> parameters.put("eventDateTime", eventDateTime);
> processEventReminder(ctx, reminder, parameters);
> - TimeDuration duration = reminder.getDuration("repeatInterval");
> + TimeDuration duration = TimeDuration.fromNumber(reminder.getLong("repeatInterval"));
> if ((repeatCount != 0 && currentCount + 1 >= repeatCount) || duration.isZero()) {
> reminder.remove();
> } else {
>
>
--
Antwebsystems.com: Quality OFBiz services for competitive rates