From 5e1d6815358bbecf47f2a33512218cf942f94043 Mon Sep 17 00:00:00 2001 From: "mattwillis%gmail.com" Date: Mon, 30 Oct 2006 04:35:42 +0000 Subject: [PATCH] bug 349715 - Make alarm handling less strict, fallback to date / due date. Patch by Stefan Sitter r=lilmatt,ctalbert --- calendar/base/src/calAlarmService.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/calendar/base/src/calAlarmService.js b/calendar/base/src/calAlarmService.js index 068c8a98e45..4daf10d7a4b 100644 --- a/calendar/base/src/calAlarmService.js +++ b/calendar/base/src/calAlarmService.js @@ -354,9 +354,14 @@ calAlarmService.prototype = { addAlarm: function(aItem) { var alarmTime; if (aItem.alarmRelated == Components.interfaces.calIItemBase.ALARM_RELATED_START) { - alarmTime = aItem.startDate || aItem.entryDate; + alarmTime = aItem.startDate || aItem.entryDate || aItem.dueDate; } else { - alarmTime = aItem.endDate || aItem.dueDate; + alarmTime = aItem.endDate || aItem.dueDate || aItem.entryDate; + } + + if (!alarmTime) { +dump("Error: Could not determine alarm time for item '"+aItem.title+"'\n"); + return; } // Check for snooze