<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>88369</bug_id>
          
          <creation_ts>2004-08-29 11:08:27 +0000</creation_ts>
          <short_desc>when delivery-method is renamed this is not populated</short_desc>
          <delta_ts>2007-09-14 12:17:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kmail</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="S. Burmeister">sven.burmeister</reporter>
          <assigned_to name="kdepim bugs">pim-bugs-null</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>20</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>263853</commentid>
    <comment_count>0</comment_count>
    <who name="S. Burmeister">sven.burmeister</who>
    <bug_when>2004-08-29 11:08:27 +0000</bug_when>
    <thetext>Version:            (using KDE KDE 3.3.0)
OS:                Linux

When renaming a delivery-method this is not done for the identities that use it, as a result these use invalid delivery-methods.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>264746</commentid>
    <comment_count>1</comment_count>
    <who name="Don Sanders">sanders</who>
    <bug_when>2004-09-01 09:21:00 +0000</bug_when>
    <thetext>I find this report to be unintelligible. Maybe if I spent 10 minutes trying to figure out what it meant I might be able to do it, but instead I will look/wait for a more intelligible report.

I don&apos;t mean to be rude here. It&apos;s just that I spent an hour working my way through 170 reports without finding a single one with any useful information.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>264834</commentid>
    <comment_count>2</comment_count>
    <who name="S. Burmeister">sven.burmeister</who>
    <bug_when>2004-09-01 15:16:49 +0000</bug_when>
    <thetext>Am Mittwoch, 1. September 2004 09:21 schrieb Don Sanders:
&gt; ------- Additional Comments From sanders kde org  2004-09-01 09:21 -------
&gt; I find this report to be unintelligible. Maybe if I spent 10 minutes trying
&gt; to figure out what it meant I might be able to do it, but instead I will
&gt; look/wait for a more intelligible report.

1. Go to kmail configuration
1.1 In case you do not have set up a delivery method, do so, name it xyz
2. Go to identities configuration
3. Create an identity, name it itsme
4. Edit that identity
5. Go to its advanced tab
6. Find box for special delivery-method at the bottom of the tab
7. Activate special-delivery using the delivery-profile xyz
8. Close configuration

2nd Part
1. Open kmail configuration
2. Go to network
3. Rename delivery-method xyz to 000

3rd Part
1. Go to identities in kmail configuration
2. Edit the itsme identity
3. Go to the advanced tab
4. Look at that special-delivery method config at the bottom of the tab
5. Notice that it still states xyz although that delivery-method was renamed, 
hence this identity uses a non-existent delivery-method!

4th Part

Solution 1: (IMHO best)
When setting a delivery-method for an identity, kmail should not save its name 
but an ID. This way when renaming the delivery-method the ID stays the same 
and only the attribute name is changed. I think Mozilla does it this way.

Solution 2:
If a delivery-mehtod is renamed, mediate this to the identity using it, making 
it rename its setting too.

Solution 3:
Complain about identities using a non-existent delivery-method.

The reason why this bug is a problem is that if you send an email with kmail 
using a non-existing delivery-method, it does not send the email but does not 
complain either, so the user does not know why the emai is not send.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>265145</commentid>
    <comment_count>3</comment_count>
    <who name="Don Sanders">sanders</who>
    <bug_when>2004-09-02 11:26:58 +0000</bug_when>
    <thetext>Thanks I can understand this now.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>344114</commentid>
    <comment_count>4</comment_count>
    <who name="Matt Douhan">mdouhan</who>
    <bug_when>2005-05-21 22:38:35 +0000</bug_when>
    <thetext>In current HEAD / Trunk there is a sanity checker that automatically removes transports that no longer exists and resets them to useful values.
Can you please test if this problem still remains with current trunk/HEAD?
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>484333</commentid>
    <comment_count>5</comment_count>
      <attachid>18422</attachid>
    <who name="Matt Douhan">mdouhan</who>
    <bug_when>2006-11-05 19:51:39 +0000</bug_when>
    <thetext>Created attachment 18422
Patch to update idents with renamed transports

This patch updates all transports that used the original transport and sets it
to the new name thus keeping the integrity.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>488673</commentid>
    <comment_count>6</comment_count>
    <who name="Allen Winter">winter</who>
    <bug_when>2006-11-21 16:54:30 +0000</bug_when>
    <thetext>SVN commit 606743 by winterz:

Patch from Matt, fixes &quot;when delivery-method is renamed this is not populated&quot;.
Approved by Till.  Thanks Matt.

CCMAIL: matt.douhan@kdemail.net
BUGS: 88369


 M  +20 -0     configuredialog.cpp  


--- branches/KDE/3.5/kdepim/kmail/configuredialog.cpp #606742:606743
@@ -841,6 +841,8 @@
   QListViewItem *item = mTransportList-&gt;selectedItem();
   if ( !item ) return;
 
+  const QString&amp; originalTransport = item-&gt;text(0);
+
   QPtrListIterator&lt;KMTransportInfo&gt; it( mTransportInfoList );
   for ( it.toFirst() ; it.current() ; ++it )
     if ( (*it)-&gt;name == item-&gt;text(0) ) break;
@@ -869,6 +871,24 @@
   // and insert the new name at the position of the old in the list of
   // strings; then broadcast the new list:
   transportNames.insert( transportNames.at( entryLocation ), (*it)-&gt;name );
+  const QString&amp; newTransportName = (*it)-&gt;name;
+
+  QStringList changedIdents;
+  KPIM::IdentityManager * im = kmkernel-&gt;identityManager();
+  for ( KPIM::IdentityManager::Iterator it = im-&gt;modifyBegin(); it != im-&gt;modifyEnd(); ++it ) {
+    if ( originalTransport == (*it).transport() ) {
+      (*it).setTransport( newTransportName );
+      changedIdents += (*it).identityName();
+    }
+  }
+
+  if ( !changedIdents.isEmpty() ) {
+    QString information = i18n( &quot;This identity has been changed to use the modified transport:&quot;,
+                          &quot;These %n identities have been changed to use the modified transport:&quot;,
+                          changedIdents.count() );
+    KMessageBox::informationList( this, information, changedIdents );
+  }
+
   emit transportListChanged( transportNames );
   emit changed( true );
 }
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>18422</attachid>
            <date>2006-11-05 19:51:39 +0000</date>
            <delta_ts>2006-11-05 19:51:39 +0000</delta_ts>
            <desc>Patch to update idents with renamed transports</desc>
            <filename>transportbug_88369.diff</filename>
            <type>text/plain</type>
            <size>1545</size>
            <attacher name="Matt Douhan">mdouhan</attacher>
            
              <data encoding="base64">SW5kZXg6IGNvbmZpZ3VyZWRpYWxvZy5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gY29uZmlndXJlZGlhbG9n
LmNwcAkocmV2aXNpb24gNjAyMzQ3KQorKysgY29uZmlndXJlZGlhbG9nLmNwcAkod29ya2luZyBj
b3B5KQpAQCAtODU0LDYgKzg1NCw4IEBACiAgIFFMaXN0Vmlld0l0ZW0gKml0ZW0gPSBtVHJhbnNw
b3J0TGlzdC0+c2VsZWN0ZWRJdGVtKCk7CiAgIGlmICggIWl0ZW0gKSByZXR1cm47CiAKKyAgY29u
c3QgUVN0cmluZyYgb3JpZ2luYWxUcmFuc3BvcnQgPSBpdGVtLT50ZXh0KDApOworCiAgIFFQdHJM
aXN0SXRlcmF0b3I8S01UcmFuc3BvcnRJbmZvPiBpdCggbVRyYW5zcG9ydEluZm9MaXN0ICk7CiAg
IGZvciAoIGl0LnRvRmlyc3QoKSA7IGl0LmN1cnJlbnQoKSA7ICsraXQgKQogICAgIGlmICggKCpp
dCktPm5hbWUgPT0gaXRlbS0+dGV4dC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GhhdmUgYmVlbiBjaGFuZ2VkIHRvIHVz
ZSB0aGUgbW9kaWZpZWQgdHJhbnNwb3J0OiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgIGNo
YW5nZWRJZGVudHMuY291bnQoKSApOworICAgIEtNZXNzYWdlQm94OjppbmZvcm1hdGlvbkxpc3Qo
IHRoaXMsIGluZm9ybWF0aW9uLCBjaGFuZ2VkSWRlbnRzICk7CisgIH0KKwogICBlbWl0IHRyYW5z
cG9ydExpc3RDaGFuZ2VkKCB0cmFuc3BvcnROYW1lcyApOwogICBlbWl0IGNoYW5nZWQoIHRydWUg
KTsKIH0K
</data>

          </attachment>
      

    </bug>

</bugzilla>