iCalendar file must include DTSTAMP and METHOD property

RESOLVED FIXED

Status

Calendar
Internal Components
RESOLVED FIXED
16 years ago
12 years ago

People

(Reporter: Mostafa Hosseini, Assigned: Mostafa Hosseini)

Tracking

Details

Attachments

(5 attachments)

(Assignee)

Description

16 years ago
The METHOD property is needed both for email integration and OutLook export.
The DTSTAMP must be included according to the standard.
(Assignee)

Updated

16 years ago
Status: NEW → ASSIGNED

Comment 1

16 years ago
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: 129660

Comment 2

16 years ago
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

Comment 3

16 years ago
Created attachment 90488 [details] [diff] [review]
Patch to libxpical that adds DTStamp, Method, Status, Priority, 

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.

Comment 4

16 years ago
Created attachment 90512 [details] [diff] [review]
patch to load lastalarmack from X property

Patch that loads lastAlarmAck from X property member.

Comment 5

16 years ago
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);
    }

Comment 6

16 years ago
Created attachment 90591 [details] [diff] [review]
patch to load lastalarmack from X-MOZILLA-LASTALARMACK 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..
(Assignee)

Comment 7

16 years ago
Patches applied to CVS. Bug fixed. Good job Arentjan
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
(Assignee)

Comment 8

16 years ago
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 → ---

Comment 9

16 years ago
Created attachment 90624 [details] [diff] [review]
Patch for xprop & allday

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 );
     }

Comment 10

16 years ago
Created attachment 90627 [details] [diff] [review]
Set PUBLISH and DTSTAMP in AddEvent when missing

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?
(Assignee)

Comment 11

16 years ago
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
Last Resolved: 16 years ago16 years ago
Resolution: --- → FIXED

Comment 12

16 years ago
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

Updated

15 years ago
Blocks: 129660
No longer depends on: 129660
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.