Closed
Bug 192994
Opened 23 years ago
Closed 23 years ago
Rename category, add a card in corresponding Moz AB (card deleted)
Categories
(MailNews Core Graveyard :: Palm Sync, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.4alpha
People
(Reporter: nbaca, Assigned: cavin)
Details
(Keywords: dataloss, Whiteboard: [adt2])
Attachments
(2 files)
|
47.35 KB,
patch
|
sspitzer
:
superreview+
|
Details | Diff | Splinter Review |
|
726 bytes,
patch
|
sspitzer
:
superreview+
|
Details | Diff | Splinter Review |
Trunk build 2003-02-12: WinXP
Overview: Renaming a category on the palm while adding a card to the
corresponding AB in Mozilla AB results in the card being deleted.
Steps to reproduce:
1. Start with a category/mozilla address book with the same name which have no
records/cards (i.e. AB1)
3. On the palm device rename the category (i.e. AB1 --> AB2)
4. In the mozilla address book add one card (i.e. card1)
5. Perform a Hotsync
Actual Results: The renamed category/mozilla address book appear on both (AB2)
but the newly added card is gone.
Expected Results: The card added in step# 4 should appear in the renamed
category/mozilla address book on both sides. (i.e. AB2/card1)
Note: This bug was written as a result of bug# 189123.
Updated•23 years ago
|
Severity: major → critical
Summary: Rename category, add a card in correspodning Moz AB (card deleted) → Rename category, add a card in corresponding Moz AB (card deleted)
| Reporter | ||
Comment 2•23 years ago
|
||
If the new card is on the palm device side then it works as expected:
1. Start with a category/mozilla address book with the same name which have no
records/cards (i.e. AB1)
3. On the palm device, rename the category (i.e. AB1 --> AB2)
4. On the palm device, add one card to the newly renamed category(i.e. AB2/card1)
5. Perform a Hotsync
Actual Results: The palm device and the Mozilla AB both have the newly created
category/mozilla address book and each has a copy of the new card (i.e.
AB2/card1) as Expected.
Comment 3•23 years ago
|
||
Mail triage team: nsbeta1+/adt2
| Assignee | ||
Updated•23 years ago
|
Target Milestone: --- → mozilla1.4alpha
| Assignee | ||
Comment 4•23 years ago
|
||
It is caused by the fact that category id for the renamed category was
re-numbered. Because Plam category ids are the keys to tie addrbooks on both
sides together, when this happens the code will treat the renamed category as a
NEW category and will create a new addrbook in mozilla (since this category id
is new to mozilla) and will remove the corresponding addrbook from mozilla
(since it's not seen on Palm, ie removed).
I don't know when this will happen and under what circumstances when a category
is renamed on palm but it does happen sometimes but not all the time. When the
category ids are kept intact after rename this problem does not happen.
| Assignee | ||
Comment 5•23 years ago
|
||
As an experiment, I put more debug info in the conduit log and I found that
category indexes were never changed even when category ids were changed. So it
looks like we should be storing category indexes as the key in our database
instead of the category ids.
| Assignee | ||
Comment 6•23 years ago
|
||
The main fix for this bug is to use the Palm category index, instead of
category id, as the key to link/tie moz addrbooks and Palm categories together.
The patch does look big but a lot of them are only variable name changes (from
categoryId to categoryIndex). Other changes include:
1. Memory deallocation warning from MS COM in nsAbIPCCard.cpp().
2. Pass additional parameter ‘category id’ to nsSynchronizeAB(). This is the
only MSCOM API that needs both category index and category id.
3. Modify some log info to make debugging easier.
4. Change some of the MS COM interface methods to use LONG, instead of DWORD
which is unsigned long, for category index and id which can be -1.
5. Incorporate patch from bug 197494 (add code to not delete un-synced moz
addrbooks and add more log info to track Palm category creation).
| Assignee | ||
Updated•23 years ago
|
Attachment #117918 -
Flags: superreview?(sspitzer)
Comment 7•23 years ago
|
||
Comment on attachment 117918 [details] [diff] [review]
Proposed patch, v1
r/sr=sspitzer
Attachment #117918 -
Flags: superreview?(sspitzer) → superreview+
| Assignee | ||
Comment 8•23 years ago
|
||
Fix checked in.
Reminder: since the key field has changed (to category index) you can't use the
existing 'synced' addrbooks to do any more sync with the new code. So you should:
1. Sync your palm categories with mozilla addrbooks using the build without this
fix (ie, make sure your palm has the up-to-date info).
2. Run a build with this fix in it, create a new profile and then sync your palm
categories with the addrbooks in the new profile.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 9•23 years ago
|
||
The patch fails for the following scenario:
Add a new card in the moz addrbook and then sync, the card is not added to palm.
I think it may be caused by removing of the following line in nsAbIPCCard.cpp:
- memset(card, 0, sizeof(nsABCOMCardStruct));
The net effect is that the dll on the moz side returns error code of S_OK (ie,
0) but the moz conduit gets a different value (ie, -2147023898).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 10•23 years ago
|
||
Putting back memset() call seems to fix the problem.
| Assignee | ||
Updated•23 years ago
|
Attachment #118474 -
Flags: superreview?(sspitzer)
Comment 11•23 years ago
|
||
Comment on attachment 118474 [details] [diff] [review]
Fix for cards not getting synced to palm
sr=sspitzer
Attachment #118474 -
Flags: superreview?(sspitzer) → superreview+
| Assignee | ||
Comment 12•23 years ago
|
||
Fix checked in.
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 13•23 years ago
|
||
Trunk build 2003-03-26-11: WinXP
Verified Fixed.
- The original scenario is now working. Rename category on palm device, add a
card to corresponding address book, hotsync and the address book now has the new
name and retains the new card. The new card also appears on the palm device.
- Adding cards and address book on the palm still appears in the Mozilla AB
after a hotsync just as before.
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•