Bug 134423

Summary: rename of distribution list fails, list becomes unusable.
Product: [Unmaintained] kab3 Reporter: Chris Hoy Poy <chrishp>
Component: generalAssignee: Tobias Koenig <tokoe>
Status: RESOLVED UNMAINTAINED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch to fix

Description Chris Hoy Poy 2006-09-21 03:15:17 UTC
Version:           kdepim-3.5.4-0.1.fc5 (using KDE KDE 3.5.4)
Installed from:    Fedora RPMs
OS:                Linux

In Kontact (or KAddressBook) if you add a new DistributionList, then try to rename it, the new name seems to stick, but the list becomes unusable (you can't add, rename etc after that).

If you have added contacts to it, before the rename, then if you try to rename, it simply ignores the rename. (this at least doesnt make it unusable).

This worked fine in 3.5.2 from FC5. (i386)

If I load Kaddressbook (without Kontact), I can reproduce the problem.
Comment 1 Philip Rodrigues 2006-09-21 10:42:17 UTC
Confirmed on r582187 .

This seems to have something to do with kaddressbook being in a state with no distribution lists. Behaviour I observe:

1. Make sure you have one or more distribution lists. Restart kaddressbook. Create a new list, add some contacts, click on rename, choose a new name, click ok. The list briefly changes to the new name, then changes back. This is *also* a bug, but no the exact behaviour originally reported. I imagine it's related though.

2. Remove all the distribution lists. (Optional: restart kaddressbook). Now create a list, populate it and rename it. I get the behaviour described by the reporter (list becomes disabled).


Hope these observations are useful.

(BTW, workaround: the "New list" button is still enabled, so create a new list, and then switch back to the original list, which is now enabled again)
Comment 2 Philip Rodrigues 2006-09-21 13:16:14 UTC
Created attachment 17862 [details]
Patch to fix

Patch to fix: Make sure to save the list after changing it

Analysis:
DistributionListWidget::editList updates the name of the list item, then calls
updateNameCombo(), which loads the names from disk (via mManager->load()), so
we need to save the list to disk after changing it
Comment 3 Tobias Koenig 2006-10-04 14:26:00 UTC
SVN commit 592321 by tokoe:

Fixed bug #134423 with patch from Philip Rodrigues <phil@kde.org>

BUGS: 134423


 M  +1 -0      distributionlistwidget.cpp  


--- branches/KDE/3.5/kdepim/kaddressbook/features/distributionlistwidget.cpp #592320:592321
@@ -327,6 +327,7 @@
 #else
   KABC::DistributionList *list = mManager->list( oldName );
   list->setName( newName );
+  mManager->save();
   updateNameCombo();
 #endif
 
Comment 4 Tobias Koenig 2009-08-05 16:31:08 UTC
The development of the old KAddressBook will be discontinued for KDE 4.4.
Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product.