Bug 447567

Summary: kaddressbook does not display nickname
Product: [Applications] kaddressbook Reporter: kavol <kavol>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: tokoe
Priority: NOR    
Version: 5.18.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description kavol 2021-12-27 10:56:57 UTC
SUMMARY
Despite I have filed in nicknames for several contacts and made my custom style which includes contact.nickName, the nicknames are not displayed.

Note that these are actually two problems together - 1) the default style does not include nickname although this is quite important information and the style includes (almost?) everything else; 2) the nickname is not displayed even if the style includes it.

STEPS TO REPRODUCE
1. run kaddressbook in default configuration
2. edit some contact, add a nickname into the respective field
3. choose the contact, stare at the screen
4. quit kaddressbook
5. copy the default template into ~/.local/share/kaddressbook/viewertemplates/
6. rename the template (the directory and in theme.desktop)
7. edit contact_embedded.html, add "{{ contact.nickName }}" somewhere, e.g. after {{ contact.realName }}, and change the font color to something distinctive (e.g. append color="red" after size="+2") so that you know that the new style got applied and you see where the change happened
8. run kaddressbook, choose the new style
9. choose the contact with the nickname set, stare at the screen

OBSERVED RESULT
3. & 9. no nickname displayed

EXPECTED RESULT
3. nickname displayed
9. nickname displayed in red

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 21.08.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
looking into sources, according to sec/printing/grantlee/README.themes, (contact.)nickName is the correct name of the field (and grepping the sources, "nickName" appears in this form in src/importexport/contactfields.cpp, just like e.g. realName appears in the code elsewhere)