Closed
Bug 359443
Opened 18 years ago
Closed 17 years ago
Deleting item from Agenda deletes an email instead
Categories
(Calendar :: Lightning Only, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
0.7
People
(Reporter: ka, Assigned: berend.cornelius09)
References
Details
(Keywords: dataloss)
Attachments
(2 files, 1 obsolete file)
4.57 KB,
patch
|
Details | Diff | Splinter Review | |
3.21 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
select an agenda item, press delete. previously selected email disappears.
Reproducible: Always
Steps to Reproduce:
1. select an agenda item
2. press delete.
2.
3.
lightning 0.3
thunderbird 1.5.0.7
Comment 1•18 years ago
|
||
Confirmed using Thunderbird/1.5.0.8 (20061025) and Lightning/0.4a1 (2006111006) on Windows 2000.
Probably the Agenda tab needs a similar fix as done with Bug 353470 for the Todo tab.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: dataloss
OS: Windows XP → Windows 2000
Summary: lightning agenda delete, similar to bug:353470 → Deleting item from Agenda tab also deletes an Email
Version: unspecified → Lightning 0.3
Comment 2•18 years ago
|
||
I see this in Thunderbird 2.0b1 ID:2006120404 (nightly) and Lightning build 2006120403, only mail gets deleted, while item stays. The title here seems to imply that item gets deleted.
Comment 3•18 years ago
|
||
This is serious bad news. Adjusted the title.
Severity: normal → critical
Summary: Deleting item from Agenda tab also deletes an Email → Deleting item from Agenda tab deletes an email instead
Comment 4•18 years ago
|
||
*** Bug 364853 has been marked as a duplicate of this bug. ***
Comment 5•18 years ago
|
||
There should also be a regret opportunity to undo the last action.
Comment 6•18 years ago
|
||
Issue still exists with the new Today Pane using Lightning 0.7pre (2007072308).
Updated•18 years ago
|
Flags: blocking-calendar0.7?
OS: Windows 2000 → All
Hardware: PC → All
Summary: Deleting item from Agenda tab deletes an email instead → Deleting item from Agenda deletes an email instead
Updated•18 years ago
|
Flags: blocking-calendar0.7? → blocking-calendar0.7+
Assignee | ||
Comment 8•17 years ago
|
||
This patch takes care that the keypressed-event is handled by the agenda-pane
Attachment #281185 -
Flags: review?(michael.buettner)
Comment 9•17 years ago
|
||
Comment on attachment 281185 [details] [diff] [review]
patch to be reviewed
>+agendaTreeView.onKeyPress =
>+function onKeyPress(event)
>+{
>+ const kKE = Ci.nsIDOMKeyEvent;
>+ switch(event.keyCode) {
>+ case kKE.DOM_VK_DELETE:
>+ document.getElementById('agenda_new_event_command').doCommand();
>+ this.deleteEvent();
>+ event.preventDefault();
>+ event.stopPropagation();
>+ break;
>+ }
>+};
First of all, even with this patch in place the email gets nuked when hitting the 'delete'-key. You should switch the above lines 'preventDefault()' and 'stopPropagation()' to make it work. Also, please remove the 'deleteEvent()' call, it seems to be superfluous. Furthermore, the command is named 'agenda_new_event_command' but it deletes events, this is probably a copy'n'paste bug.
>+ var selectedItems = new Array();
>+ var tree = document.getElementById("agenda-tree");
>+ var start = new Object();
>+ var end = new Object();
>+ var numRanges = tree.view.selection.getRangeCount();
>+ var t;
>+ var v;
>+ var agendaItem;
>+ for (t = 0; t < numRanges; t++) {
>+ tree.view.selection.getRangeAt(t, start, end);
>+ for (v = start.value; v <= end.value; v++) {
>+ agendaItem = this.events[v];
>+ selectedItems.push(agendaItem);
>+ }
>+ }
I suggest to introduce variables as late as possible. You could remove the declaration of the variables 't', 'v' and 'agendaItem' and write the rest as follows:
for (var t = 0; t < numRanges; t++) {
tree.view.selection.getRangeAt(t, start, end);
for (var v = start.value; v <= end.value; v++) {
selectedItems.push(this.events[v]);
}
}
r=mickey with the above mentioned issues being addressed. Thanks for the patch, Berend.
Attachment #281185 -
Flags: review?(michael.buettner) → review+
Assignee | ||
Comment 10•17 years ago
|
||
patch checked in on trunk and MOZILLA_1_8_BRANCH
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 11•17 years ago
|
||
modified the last patch as mickey suggested
Attachment #281185 -
Attachment is obsolete: true
Comment 12•17 years ago
|
||
(In reply to comment #9)
> Furthermore, the command is named
> 'agenda_new_event_command' but it deletes events, this is probably a
> copy'n'paste bug.
... which wasn't fixed before checkin. :-(
Target Milestone: --- → 0.7
Comment 13•17 years ago
|
||
(In reply to comment #12)
> (In reply to comment #9)
> > Furthermore, the command is named
> > 'agenda_new_event_command' but it deletes events, this is probably a
> > copy'n'paste bug.
>
> ... which wasn't fixed before checkin. :-(
>
Berend, please change the name accordingly and check it in. It's not a major problem but just adds unnecessarily confusion. Please mention in the check-in comment that it is an add-on patch.
Assignee | ||
Comment 14•17 years ago
|
||
Checked in remaining naming issue
patch checked in on trunk and MOZILLA_1_8_BRANCH.
Comment 15•17 years ago
|
||
Verified with lightning 2007092403. However it's not possible to undo the delete from agenda in mail mode
Status: RESOLVED → VERIFIED
Comment 16•17 years ago
|
||
(In reply to comment #15)
> Verified with lightning 2007092403. However it's not possible to undo the
> delete from agenda in mail mode
>
Omar, please file a new bug for this issue.
Comment 17•17 years ago
|
||
I've filled a new bug 398405(In reply to comment #16)
> (In reply to comment #15)
> > Verified with lightning 2007092403. However it's not possible to undo the
> > delete from agenda in mail mode
> >
>
> Omar, please file a new bug for this issue.
>
I've filled a new bug 398405
You need to log in
before you can comment on or make changes to this bug.
Description
•