svn commit: r787119 - /ofbiz/branches/release09.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalendarWorker.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r787119 - /ofbiz/branches/release09.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalendarWorker.java

adrianc
Author: adrianc
Date: Mon Jun 22 00:28:21 2009
New Revision: 787119

URL: http://svn.apache.org/viewvc?rev=787119&view=rev
Log:
Another iCalendar fix. I discovered the iCal4J library will say a Calendar is valid even when it isn't.

Modified:
    ofbiz/branches/release09.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalendarWorker.java

Modified: ofbiz/branches/release09.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalendarWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalendarWorker.java?rev=787119&r1=787118&r2=787119&view=diff
==============================================================================
--- ofbiz/branches/release09.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalendarWorker.java (original)
+++ ofbiz/branches/release09.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalendarWorker.java Mon Jun 22 00:28:21 2009
@@ -125,23 +125,23 @@
         }
         List<GenericValue> relatedParties = EntityUtil.filterByDate(delegator.findList("WorkEffortPartyAssignView", EntityCondition.makeCondition("workEffortId", EntityOperator.EQUALS, workEffortId), null, null, null, false));
         for (GenericValue partyValue : relatedParties) {
-            ParameterList paramList = null;
             String partyName = partyValue.getString("groupName");
             if (UtilValidate.isEmpty(partyName)) {
-                partyName = partyValue.getString("firstName") + "_" + partyValue.getString("lastName");
+                partyName = partyValue.getString("firstName") + " " + partyValue.getString("lastName");
             }
-            partyName = partyName.replace(" ", "_");
             try {
+                Property partyProperty = null;
                 if ("CAL_ORGANIZER~CAL_OWNER".contains(partyValue.getString("roleTypeId"))) {
-                    Organizer organizer = new Organizer("CN:".concat(partyName));
-                    paramList = organizer.getParameters();
-                    eventProps.add(organizer);
+                    partyProperty = new Organizer();
                 } else {
-                    Attendee attendee = new Attendee("CN:".concat(partyName));
-                    paramList = attendee.getParameters();
-                    eventProps.add(attendee);
+                    partyProperty = new Attendee();
                 }
+                eventProps.add(partyProperty);
+                // RFC 2445 4.8.4.1 and 4.8.4.3 Value must be a URL
+                partyProperty.setValue("MAILTO:[hidden email]");
+                ParameterList paramList = partyProperty.getParameters();
                 paramList.add(new XParameter("X-ORG-APACHE-OFBIZ-PARTY-ID", partyValue.getString("partyId")));
+                paramList.add(new Cn(partyName));
             } catch (Exception e) {
                 Debug.logError(e, "Error while processing related parties: ", module);
             }