Closed Bug 322859 Opened 14 years ago Closed 14 years ago

ORGANIZER property lost on roundtrip

Categories

(Calendar :: Internal Components, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Lightning 0.3

People

(Reporter: jminta, Assigned: jminta)

Details

(Keywords: dataloss, testcase)

Attachments

(3 files)

Testcase from Oracle coming.  Relevant line: ORGANIZER;X-ORACLE-GUID=07FC24E37F265815E0405794071A700C;CN=Simon Vaillan
 court:mailto:simon.vaillancourt@oracl1.com
Attached file testcase.ics
+
+        if (this.mOrganizer) {
+            m.mOrganizer = this.mOrganizer;
+        }

to calItemBase's clone().  Proper patch coming in a few days.
Assignee: base → jminta
I think we need to actually clone the organizer, mirroring the way attendees work.
Attachment #208049 - Flags: first-review?(jminta)
Comment on attachment 208049 [details] [diff] [review]
clone the organizer, if it exists

yep, yep. r=jminta
Attachment #208049 - Flags: first-review?(jminta) → first-review+
Fixed.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
That does not work for me. Import the event from testcase.ics and export the event to a new *.ics file. Examine the *.ics file with a text editor. There is no ORGANIZER element. Same with the testcase from Bug 320000.

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060121 Mozilla Sunbird/0.3a1+.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to comment #6)
> That does not work for me. Import the event from testcase.ics and export the
> event to a new *.ics file. Examine the *.ics file with a text editor. There is
> no ORGANIZER element. Same with the testcase from Bug 320000.
> 
> Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060121
> Mozilla Sunbird/0.3a1+.
> 
The original bug was about simply roundtriping the attendee when subscribing.  The storage provider doesn't look for an organizer property at all, so import+export will lose it.  I don't have a problem using this bug to fix that, but I wanted to be clear why the above patch did fix the original problem.

(I suspect there are a fair number of other properties that the storage provider drops.)
Ok, if this was not the intention of this bug feel free to close it. There are more problems with that testcase. When opening the event in the new item dialog the attendees field displays 'undefined'. But that should be another bug.
Subscribing means ics provider? So it should also work with a remote calendar using file:/// url?

From the testcase:

ORGANIZER;X-ORACLE-GUID=07FC24E37F265815E0405794071A700C;CN=Simon Vaillan
 court:mailto:simon.vaillancourt@oracle.com
ATTENDEE;X-ORACLE-SHOWASFREE=BUSY;X-ORACLE-GUID=07FC24E37F265815E04057940
 71A700C;CUTYPE=INDIVIDUAL;RSVP=FALSE;CN=Simon Vaillancourt;PARTSTAT=ACCE
 PTED:mailto:simon.vaillancourt@oracle.com

After opening the edit event dialog and pressing ok:

ATTENDEE;CN=Simon Vaillancourt:mailto:simon.vaillancourt@oracle.com
ATTENDEE;RSVP=FALSE;CN=Simon Vaillancourt;CUTYPE=INDIVIDUAL:mailto:
 simon.vaillancourt@oracle.com
 
Or is this also not the scope of this bug?
(In reply to comment #9)
> Subscribing means ics provider? So it should also work with a remote calendar
> using file:/// url?
It *should*.

> Or is this also not the scope of this bug?
> 
I think this type of dataloss is within the scope of this bug.  The basic idea here is that an organizer is treated exactly like an attendee.  However, when we hit http://landfill.mozilla.org/mxr-test/mozilla/source/calendar/base/src/calItemBase.js#576 we end up adding an "ATTENDEE" property, rather than an "ORGANIZER" property, since calIAttendee always returns attendee properties.
Since we don't actually generate ORGANIZER properties yet, this bug can wait for 0.2.
No longer blocks: lightning-0.1
Target Milestone: --- → Lightning 0.2
(cleaning up some of my old assigned bugs)

As I mentioned in comment #10, the current problem is that the organizer is a calIAttendee.  When getting the icalProperty from this, it returns an ATTENDEE property, rather than an ORGANIZER property.  This patch introduces a flag in order to determine which type of property should be returned.  We will still have issues with importing into storage, but there are larger problems there.  I'm mostly concerned about round-tripping ics files here.
Attachment #212393 - Flags: first-review?(mvl)
Comment on attachment 212393 [details] [diff] [review]
introduce isOrganizer flag to set icalProperty type

r=mvl
Attachment #212393 - Flags: first-review?(mvl) → first-review+
I'd be ok with this landing before 0.1, since it's a pretty simple fix to an obvious dataloss bug.  Can you change to use a doxygen-style comment in the IDL?
Patch "introduce isOrganizer flag to set icalProperty type" checked in.  Since this ought to fix the ics-roundtrip issues, I'm going to close this bug.  Feel free to file follow-ups on import-export issues.
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Keywords: testcase
You need to log in before you can comment on or make changes to this bug.