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 2010/02/02 01:01:49 UTC
svn commit: r905468 -
/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java
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;
}