Closed Bug 401572 Opened 18 years ago Closed 18 years ago

Selective calling of onRemoveAlarmsByItem / Error Console "startDate has no Properties"

Categories

(Calendar :: Alarms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: Fallen)

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

bug 288496 actually caused the error to appear, but the right place to fix it is in the alarm monitor. onRemoveAlarmsByItem was called for most every item, even tasks that have no start and entry date. This patch changes it to only signal for items that have either start or entry date.
Attached patch Fix v1 (obsolete) — Splinter Review
Attachment #286566 - Flags: review?(daniel.boelzle)
Comment on attachment 286566 [details] [diff] [review] Fix v1 > removeAlarm: function cas_removeAlarm(aItem) { >+ // If the item is a task and does not have a due or entry date, then we >+ // can't fire an alarm for it. Such items should never be added so >+ // removing them is trivial. >+ if (!aItem.startDate && !aItem.entryDate) { >+ return; >+ } Use hasAlarm(); r=dbo
Attachment #286566 - Flags: review?(daniel.boelzle) → review+
Attached patch Fix v2 (obsolete) — Splinter Review
Second version as discussed. Asking for review again to make sure I did the right thing.
Attachment #286566 - Attachment is obsolete: true
Attachment #286727 - Flags: review?(daniel.boelzle)
Attached patch Fix v3Splinter Review
New version as discussed: * Put calculation into the renamed function getAlarmDate * Only remove if it was possible to add the item * Return from addAlarm if its not possible to add, which takes the load off the callers to check if the item should be added in the first place.
Attachment #286727 - Attachment is obsolete: true
Attachment #288318 - Flags: review?(daniel.boelzle)
Attachment #286727 - Flags: review?(daniel.boelzle)
Comment on attachment 288318 [details] [diff] [review] Fix v3 looks clean; r=dbo
Attachment #288318 - Flags: review?(daniel.boelzle) → review+
Checked in on HEAD and MOZILLA_1_8_BRANCH -> FIXED
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: