Bug 416663 - Office 365/EWS Incorrect account folder name
Summary: Office 365/EWS Incorrect account folder name
Status: RESOLVED FIXED
Alias: None
Product: kontact
Classification: Applications
Component: mail (show other bugs)
Version: 5.13.1
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-23 19:05 UTC by Lenon Kitchens
Modified: 2020-03-21 13:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lenon Kitchens 2020-01-23 19:05:42 UTC
SUMMARY
On all platforms that I've tried (Ubuntu and derivatives, Debian stable/unstable, Arch based distros) Office 365 accounts show in the folder list as "akonadi_ews_resource_X" instead of the name you give them.

STEPS TO REPRODUCE
1. Create and EWS resource for an Office 365 (maybe other) account
2. Verify that the name in the folder list is not the name you gave the account

OBSERVED RESULT
Folder named "akonadi_ews_resource_X"

EXPECTED RESULT
Folder name "Custom Mail Account"

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.0

ADDITIONAL INFORMATION
Comment 1 Igor Poboiko 2020-03-21 13:14:18 UTC
Git commit 4484df3d6f0c449ec2cfd4956175eab507f4cc55 by Igor Poboiko.
Committed on 21/03/2020 at 13:14.
Pushed by poboiko into branch 'master'.

[resources/ews] Adjust name of root collection to the name of the resource

Summary:
The name of root collection inside the Akonadi DB (and thus, i.e. inside KMail)
is always `akonadi_ews_resource#`, even if the resource itself was renamed.
Even though we call `mRootCollection->setName(name())`, the name get's
overriden after we fetch it from DB.
The settings UI changes the name of the resource, but not root collection.

This patch runs `CollectionModifyJob` to rename the root collection in both
scenarios: either when we fetch root collection or change the resource name.
Related: bug 413078

Test Plan:
1) Open KMail -> Settings -> Accounts -> Receiving -> EWS account
2) Change "Account Name", save
3) The change gets applied to Mailbox View inside KMail UI immediately

Reviewers: dvratil, nowicki

Reviewed By: dvratil

Subscribers: kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D27817

M  +13   -0    resources/ews/ewsresource.cpp
M  +1    -0    resources/ews/ewsresource.h

https://commits.kde.org/kdepim-runtime/4484df3d6f0c449ec2cfd4956175eab507f4cc55