Closed Bug 731674 Opened 10 years ago Closed 10 years ago

One calendar item stays visible after multi or recurring item deletion in multi-day view


(Calendar :: Calendar Frontend, defect)

Not set


(Not tracked)



(Reporter: info, Assigned: info)



(1 file)

Attached patch Patch 1 — — Splinter Review
When I select multiple calendar items and press delete or select delete from the right-mouse click menu all al removed from the view except one.
This also happens when an occurrence, not the first, in an recurring event is selected and delete is pressed and I select all occurrences to be delete. Then all visible occurrences are deleted except the previous visible occurrence relative to the selected occurrence.

When I move the view to a previous or later time frame and go back to the frame where the deletion was done it does not show the above mentioned item which stayed visible.

I cannot reproduce this with the storage provider but am able to reproduce this with the Exchange Calendar and Task provider. Did not test with other providers.

Expected behaviour is that all selected item are removed from the view when deleted.

I attached a patch which solves this bug.
Comment on attachment 601661 [details] [diff] [review]
Patch 1

Thanks for the patch! I'll take a look at it soon :)
Attachment #601661 - Flags: review?(philipp)
Michel, could you explain how this patch fixes it? I'm a bit confused, it seems to me like the new code is just doing the same differently?

During testing I found out that the problem did not exist in the calendar-month-view.xml. I then checked the code used in there.

The difference between the old code and the new code is that mSelectedItems list is update before the item is deleted instead after deletion. I did not check if the "column.deleteEvent(aEvent);" action changes the mSelectedItems.

Second I think the code in the patch/calendar-month-view.xml does not use the splice function but a filter function which is more efficient.

Third the code for multi-view and month-view doDelete are now the same in setup.

And last the reproducable problem reported is fixed and works.
Comment on attachment 601661 [details] [diff] [review]
Patch 1

Ok, then lets do it. Code looks fine and it doesn't break anything obvious from testing. I think its safe to put this in beta, which I'm building this evening.

Attachment #601661 - Flags: review?(philipp) → review+
Pushed to comm-central changeset d09df293d75e
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.5
Assignee: nobody → info
You need to log in before you can comment on or make changes to this bug.