Closed Bug 699922 Opened 9 years ago Closed 7 years ago

Address book change in "Edit contact" lost after "Edit Details"

Categories

(Thunderbird :: Address Book, defect)

7 Branch
x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 28.0

People

(Reporter: Ulf.Zibis, Assigned: aryx)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Build ID: 20110928134238

Steps to reproduce:

- context menu on email field in header section
- choose "Edit contact"
- with combo box select another address book to assign the contact to
- choose "Edit Details"
- make some changes
- hit ok


Actual results:

- the change of the address book assignment is lost


Expected results:

- the edited address book card should be assigned (=moved) to the selected address book.
Summary: Address book change lost in "Edit contact" → Address book change in "Edit contact" lost after "Edit Details"
Blocks: 699929
Blocks: 580642
(In reply to Ulf.Zibis from comment #0)
Agreed. It is copied to the other address book but not moved (as in deleted from the original address book).
Is this a new behavior or it always was like that ?
I don't remember, I ever tried it before, so I don't know the answer.
Attached patch patch, v1 (obsolete) — Splinter Review
This patch saves the contact details from the pop-up before opening the Edit Details view. It also changes the behavior on changing the address book to create the new card in the new address book first and delete it from the old one after that.
Assignee: nobody → archaeopteryx
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #805033 - Flags: review?(mconley)
Comment on attachment 805033 [details] [diff] [review]
patch, v1

Review of attachment 805033 [details] [diff] [review]:
-----------------------------------------------------------------

Tentative r+, but I want to hear more about the reordering of the address book reassignment operations before I give a full r+.

::: mail/base/content/editContactOverlay.js
@@ +227,5 @@
>      }
>      else {
>        // We changed address books for the card.
>  
> +      // Add it to the chosen address book...

I'm curious why this ordering was changed. Any reason for the churn?
Attachment #805033 - Flags: review?(mconley)
Comment on attachment 805033 [details] [diff] [review]
patch, v1

(In reply to Mike Conley (:mconley) from comment #5)
> ::: mail/base/content/editContactOverlay.js
> @@ +227,5 @@
> >      }
> >      else {
> >        // We changed address books for the card.
> >  
> > +      // Add it to the chosen address book...
> 
> I'm curious why this ordering was changed. Any reason for the churn?
If adding the contact to the new addressbook fails before this patch, the contact will be lost because it has been already deleted from the old addressbook. After the patch has been applied, a failing 'Add' operation simply keeps the contact in the old addressbook.
Attachment #805033 - Flags: review?(mconley)
Comment on attachment 805033 [details] [diff] [review]
patch, v1

Review of attachment 805033 [details] [diff] [review]:
-----------------------------------------------------------------

Ah, k. All is clear.
Attachment #805033 - Flags: review?(mconley) → review+
https://hg.mozilla.org/comm-central/rev/3c207e4668a0
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 28.0
You need to log in before you can comment on or make changes to this bug.