<table><tr><td style="">poboiko created this revision.<br />poboiko added reviewers: dvratil, nowicki.<br />Herald added a project: KDE PIM.<br />poboiko requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D27817">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The name of root collection inside the Akonadi DB (and thus, i.e. inside KMail)<br />
is always <tt style="background: #ebebeb; font-size: 13px;">akonadi_ews_resource#</tt>, even if the resource itself was renamed. <br />
Even though we call <tt style="background: #ebebeb; font-size: 13px;">mRootCollection->setName(name())</tt>, the name get's <br />
overriden after we fetch it from DB. <br />
The settings UI changes the name of the resource, but not root collection.</p>

<p>This patch runs <tt style="background: #ebebeb; font-size: 13px;">CollectionModifyJob</tt> to rename the root collection in both<br />
scenarios: either when we fetch root collection or change the resource name.</p>

<p>BUG: 413078<br />
BUG: 416663</p></div></div><br /><div><strong>TEST PLAN</strong><div><ol class="remarkup-list">
<li class="remarkup-list-item">Open KMail -> Settings -> Accounts -> Receiving -> EWS account</li>
<li class="remarkup-list-item">Change "Account Name", save</li>
<li class="remarkup-list-item">The change gets applied to Mailbox View inside KMail UI immediately</li>
</ol></div></div><br /><div><strong>REPOSITORY</strong><div><div>R44 KDE PIM Runtime</div></div></div><br /><div><strong>BRANCH</strong><div><div>ews-adjust-root-collection (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D27817">https://phabricator.kde.org/D27817</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>resources/ews/ewsresource.cpp<br />
resources/ews/ewsresource.h</div></div></div><br /><div><strong>To: </strong>poboiko, dvratil, nowicki<br /><strong>Cc: </strong>kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>