Bug 411964 - I can not load my personal data from an KAddressbook.
Summary: I can not load my personal data from an KAddressbook.
Status: RESOLVED NOT A BUG
Alias: None
Product: kmymoney
Classification: Applications
Component: bugtracker (show other bugs)
Version: 5.0.3
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-16 12:31 UTC by Vladislav
Modified: 2019-09-18 23:15 UTC (History)
1 user (show)

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 Vladislav 2019-09-16 12:31:50 UTC
SUMMARY


STEPS TO REPRODUCE
1. During the first run, click on the Load from Addressbook

OBSERVED RESULT
I get a popup: Unable to load data, because no contact has been associated with the owner of the standard address book.
I can not select any contacts as the owner.

EXPECTED RESULT
Download all contact data from the KAddressbook.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.4.15
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.3

ADDITIONAL INFORMATION
Comment 1 Thomas Baumgart 2019-09-16 13:24:05 UTC
From the documentation on https://docs.kde.org/stable5/en/extragear-office/kmymoney/firsttime.3.html

"In case you have an address for yourself stored in the KAddressBook, the button Load from Addressbook is enabled and pressing it imports all information into KMyMoney."

It does import that one contact but not the whole addressbook. Such a feature does not exist.

In case the button is enabled, KAddressBook reports to KMyMoney that it has a default address. In case that does not work properly, please change the product setting of this bug to kaddressbook. The same applies, if you cannot mark any contact as the owner of the addressbook.

I just verified, that it works as expected here on 5.0.6.
Comment 2 Thomas Baumgart 2019-09-16 13:31:20 UTC
Small amendment: the owner entry is only accepted by KMyMoney if it contains an e-mail address.
Comment 3 Jack 2019-09-16 22:10:51 UTC
I have kaddressbook (5.11.3 according to About, 19.04.3 according to my distro) and I can not find anywhere in the application to set a default user or an owner.  I also don't see it mentioned in the handbook, which is still in initial review, and not actually released.  Can anyone point out where this can be set, before I do reassign this bug to them?
Comment 4 Vladislav 2019-09-17 09:06:43 UTC
(In reply to Vladislav from comment #0)
> SUMMARY
> 
> 
> STEPS TO REPRODUCE
> 1. During the first run, click on the Load from Addressbook
> 
> OBSERVED RESULT
> I get a popup: Unable to load data, because no contact has been associated
> with the owner of the standard address book.
> I can not find how to select any contact as the owner in the KAddressbook.
> 
> EXPECTED RESULT
> Download owner`s contact data from the KAddressbook.
> 
> SOFTWARE/OS VERSIONS
> Linux/KDE Plasma: 
> (available in About System)
> KDE Plasma Version: 5.4.15
> KDE Frameworks Version: 5.54.0
> Qt Version: 5.11.3
> 
> ADDITIONAL INFORMATION

I corrected the report.
Comment 5 Thomas Baumgart 2019-09-17 15:54:31 UTC
I did not find a UI mechanism to set the owner record as well. This is with 5.10.3.  It must have been there at times (maybe even KDE4) because my record is returned for it. I have not (yet) investigated where that piece of information is stored in the database, but I know that https://lxr.kde.org/source/kde/pim/kidentitymanagement/src/identity.cpp#0373 needs to return true. It should do that in your case as well, because if it does not, the button is disabled.

Do you have an e-mail address with your record in KAddressBook? KMyMoney checks for that and displays the error in case it does not find one.
Comment 6 Jack 2019-09-17 17:45:27 UTC
The question is how does it know which kaddressbook record belongs to the owner, or at least the user currently logged in?  SystemSettings let's me set name and email for each user, but that doesn't do it.  I can see it saves the real name in the /etc/passwd record, but I don't know where it saves that email address.  I've also tried setting the nickname in the kaddressbook record to my username, but no change.  Does it matter which or what type of address book you are using?  I'm using a vcf file as my primary addressbook, although there are others defined (but not enabled.)
Comment 7 Vladislav 2019-09-17 23:36:32 UTC
> Do you have an e-mail address with your record in KAddressBook?

Yes, even in System Settings > Account Details > User > Email Address.
Comment 8 Thomas Baumgart 2019-09-18 08:09:33 UTC
Let's see if we get an answer (https://forum.kde.org/viewtopic.php?f=215&t=162440)
Comment 9 Thomas Baumgart 2019-09-18 11:44:58 UTC
And we did get an answer. Can you check it please and see if it helps? TIA.

https://forum.kde.org/viewtopic.php?f=215&t=162440&p=422336&e=422336
Comment 10 Vladislav 2019-09-18 13:10:07 UTC
(In reply to Thomas Baumgart from comment #9)
> And we did get an answer. Can you check it please and see if it helps? TIA.
> 
> https://forum.kde.org/viewtopic.php?f=215&t=162440&p=422336&e=422336

YES! It works!)
I set my email in KMail > Settings > Configure KMail... > Accounts

I would not find it on my own. It would be great if the owner’s contact could be selected by default in the KAddressbook, or at least in the pop-up window it was said that the default contact should be added to KMail. Also, can I somehow supplement the documentation on this link (https://docs.kde.org/stable5/en/extragear-office/kmymoney/firsttime.3.html)?
Thank you very much for the help!
Comment 11 Jack 2019-09-18 23:09:35 UTC
I will not have time to actually test this for myself until tomorrow, but although I use KMyMoney and KAddressBook, I do NOT use KMail, and see no other way to set this ownership.  In my case, the button is enabled, but clicking it (on either the New File or Personal Data dialog) gives me the error.  I also note that the error is from KMyMoney, not from KAddressBook, but I have not yet traced through the code to see exactly what is happening to trigger showing the error.
Comment 12 Jack 2019-09-18 23:15:52 UTC
I do have the file .config/emailidentities but I have no idea what applications write to it.  There is a "Default Identity" but I have no idea what this number is, or where else it might be used.  Under Identity #0 (the only one) the Default Domain is actually the hostname, not the domain name I use (.home) and the Identity is Unnamed.

I suspect if I can find what tool I can use to write to this file, it will solve the problem, and I can update the manual appropriately.