Closed Bug 274464 Opened 20 years ago Closed 20 years ago

calIEvent.icalComponent.serializeToICS() outputs summary (and other fields), even when never set

Categories

(Calendar :: Internal Components, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mvl, Assigned: shaver)

Details

Attachments

(1 obsolete file)

getting the ics string from an event gives summary, priority, class, dtstart and
dtend while those were never set. It should not output them.

testcase:

var icsServ = Components.classes["@mozilla.org/calendar/ics-service;1"]
                        .createInstance(Components.interfaces.calIICSService);
var comp = icsServ.createIcalComponent("VCALENDAR");
var event = Components.classes["@mozilla.org/calendar/event;1"]
                      .createInstance(Components.interfaces.calIEvent);
dump(event.icalComponent.serializeToICS());

actual results:
BEGIN:VEVENT
CREATED:20041213T184159
LAST-MODIFIED:20041213T184159
SUMMARY:
PRIORITY:0
CLASS:PUBLIC
DTSTART:00000100T000000
DTEND:00000100T000000
DTSTAMP:20041213T184159
END:VEVENT

expected:
BEGIN:VEVENT
CREATED:20041213T184159
LAST-MODIFIED:20041213T184159
DTSTAMP:20041213T184159
END:VEVENT

(whitespaces removed. new libical version doesn't fix)
(before you wonder: the missing Z after the datetime fields seem to be a problem
with my test new libical. It works in the currently used version)
This isn't a serialization bug, that I can see.  The calEvent has some things
that default to things like "0" for priority and "PUBLIC" for class.

Do we want to not have any defaults for these?
I can live with a default priority, but i don't like the default dtstart and
dtend. a priorty of 0 makes some sense, but a start date of 0000-01-00? That's
quite some time ago...
Attached patch ensure initialization before enumerating (obsolete) — — Splinter Review
Attachment #168743 - Flags: second-review?(darin)
Attachment #168743 - Flags: first-review?(vladimir)
Comment on attachment 168743 [details] [diff] [review]
ensure initialization before enumerating

Sigh, wrong patch for this bug.
Attachment #168743 - Attachment is obsolete: true
Attachment #168743 - Flags: second-review?(darin)
Attachment #168743 - Flags: first-review?(vladimir)
Fixed by the patch for 275070.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: