ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adri...@apache.org
Subject svn commit: r905468 - /ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java
Date Tue, 02 Feb 2010 00:01:49 GMT
Author: adrianc
Date: Tue Feb  2 00:01:49 2010
New Revision: 905468

URL: http://svn.apache.org/viewvc?rev=905468&view=rev
Log:
Fixed a bug in the iCalendar integration that was introduced with the new temporal expressions.

Modified:
    ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java

Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java?rev=905468&r1=905467&r2=905468&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java
(original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java
Tue Feb  2 00:01:49 2010
@@ -86,6 +86,7 @@
         Set<Integer> monthDayList = FastSet.newInstance();
         Set<WeekDay> weekDayList = FastSet.newInstance();
         Set<Integer> hourList = FastSet.newInstance();
+        Set<Integer> minuteList = FastSet.newInstance();
         String freq = null;
         int freqCount = 0;
         for (Recur recur : recurList) {
@@ -93,7 +94,8 @@
             monthDayList.addAll(recur.getMonthDayList());
             weekDayList.addAll(recur.getDayList());
             hourList.addAll(recur.getHourList());
-            if (recur.getInterval() != 0 && freq == null) {
+            minuteList.addAll(recur.getMinuteList());
+            if (recur.getInterval() != 0) {
                 freq = recur.getFrequency();
                 freqCount = recur.getInterval();
             }
@@ -104,6 +106,8 @@
             freq = Recur.DAILY;
         } else if (freq == null && hourList.size() > 0) {
             freq = Recur.HOURLY;
+        } else if (freq == null && minuteList.size() > 0) {
+            freq = Recur.MINUTELY;
         }
         if (freq == null) {
             throw new IllegalStateException("Unable to convert intersection");
@@ -116,6 +120,7 @@
         newRecur.getMonthDayList().addAll(monthDayList);
         newRecur.getDayList().addAll(weekDayList);
         newRecur.getHourList().addAll(hourList);
+        newRecur.getMinuteList().addAll(minuteList);
         return newRecur;
     }
 



Mime
View raw message