Closed Bug 141280 Opened 22 years ago Closed 22 years ago

iCalendar file must include DTSTAMP and METHOD property

Categories

(Calendar :: Internal Components, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mostafah, Assigned: mostafah)

References

Details

Attachments

(5 files)

The METHOD property is needed both for email integration and OutLook export.
The DTSTAMP must be included according to the standard.
Status: NEW → ASSIGNED
The calendar imports/exports iCalendar events with DTSTAMP. It needs to add a
DTSTAMP when it creates an event. We should look at adding SEQUENCE and other
properties when we add the DTSTAMP property.

METHOD is part of iTip. Dan P needs that for his stuff.

Gary
Depends on: cal-standards
I added DTSTAMP and METHOD to VEVENT, but METHOD is a property of VCALENDAR, 
not VEVENT. Not sure what would be the best way to set METHOD of the VCALENDAR 
objects...

   BEGIN:VCALENDAR
   METHOD:PUBLISH
   PRODID:-//ACME/DesktopCalendar//EN
   VERSION:2.0
   BEGIN:VEVENT
   DTSTART:19970701T200000Z
   DTSTAMP:19970611T190000Z
   SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
   UID:0981234-1234234-23@example.com
   END:VEVENT
   END:VCALENDAR
Patch to libxpical to add DTSTAMP and METHOD properties
Also adds PRIORITY and STATUS which where in my tree.
Method and Status are enums, I added the consts from ical.h to oeIICalEvent.
Not sure if this is the cleanest way to add this though.
Patch that loads lastAlarmAck from X property member.
It should not be hard to store the lastalarmack in a new property "X-MOZILLA-
LASTALARMACK" instead of the X member that is used now.

According to the libical docs this can be done by adding after:
    prop = icalproperty_new_x( icaltime_as_ical_string(m_lastalarmack ));

a line to change the name of the property:
    icalproperty_set_x_name (prop, "X-MOZILLA-LASTALARMACK");
then the member doesn't have to be used.

When searching for microsoft xprops ximian does this:

    prop = icalcomponent_get_first_property (icomp, ICAL_X_PROPERTY);
    while (prop) {
	const char *x_name;
	x_name = icalproperty_get_x_name (prop);
	if (!strncmp (x_name, "X-MICROSOFT-", strlen ("X-MICROSOFT-"))) {
		add_it = TRUE;
		break;
	}
	prop = icalcomponent_get_next_property (icomp, ICAL_X_PROPERTY);
    }
same as attachment 90512 [details] [diff] [review] in comment #4, but uses X-MOZILLA-LASTALARMACK instead
of using an X member. It is actually shorter in code..
Patches applied to CVS. Bug fixed. Good job Arentjan
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
This is not completely fixed because if the dtstamp is not set it doesn't get
added to the event but every event must have a dtstamp.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch Patch for xprop & allday β€” β€” Splinter Review
I got the source from CVS, One line of the patch got lost. This realy messes up
the calendar ics data. In the attached patch both a fix for this and for == on
allday bug.

     if( !icaltime_is_null_time( m_lastalarmack ) ) {
	 prop = icalproperty_new_x( icaltime_as_ical_string(m_lastalarmack ));
	 icalproperty_set_x_name( prop, XPROP_LASTALARMACK);
+	icalcomponent_add_property( vevent, prop );
     }
Adds DTSTART and METHOD if not there.
Note that I didn't now a better way to get the current date/time for the stamp,
there might be a single call to do that?
m_stamp will now be initialized to the current time when an event object is
created. This makes sure the DTSTAMP property ( which is mandatory ) exists in
all VEVENT components.
Resloving as fixed.
Status: REOPENED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
Default QA Contact for Calendar has changed.  If you wish to remain the QA
contact for this bug, feel free to change it back.
QA Contact: colint → brantgurganus2001
No longer depends on: cal-standards
Mass move of libxpical bugs to the Internal Components, per ctalbert.
Component: libxpical → Internal Components
The bugspam monkeys have been set free and are feeding on Calendar :: Internal Components. Be afraid for your sanity!
QA Contact: gurganbl → base
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: