[KAddressbook] How to use contact groups with Nextcloud?

This question is about how to use KAddressbook/Akondi with Nextcloud contacts.

I was able to integrate my NC contacts into KDE via CardDAV. I see all my individual contacts and they are properly synced both ways.

However, contact groups do not work. How do I get them to work?

I can create contact groups in Nextcloud via the web UI, but those groups do not appear in KAddressbook. I cannot create contact groups in KAddressbook. After I have clicked the button to create a new group, the selection list of address books where I want to create the group appears empty.

Has anybody figured out how to do it? Or does KDE simply lack the support?

I assume it might have to do something with the fact, that there are actually two different approaches how contact groups are represented in CardDAV:

  1. groups are categories of contacts
  2. groups are independent CardDAV entries.

I know that NC takes the first approach and on Android the DAV5x connector provides a setting to choose which method the server uses. I haven’t found any related setting in KDE.

I manage it via separate addressbooks, not groups

This is from nexctloud

Summary

nx_address_01

And here’s how it looks in Kontact

Summary

kde_address_01

DAVx5 also offers option to select which address books you want to sync

Summary

I did create groups at first in Nextcloud contacts, thought it would be proper and easier, but I think this way is actually better. Problem is, NC contacts has no option to display addressbooks separately (at least I don’t know), so you would basically have to create groups just for managing contacts there. But I don’t do that, I need NC only for setup and syncing, all the contact changes and updates I make usually from Kontact (KAddressbook), sometimes from phone

Using different addressbooks for groups has one big disadvantage: one cannot have the same contact in different groups simultaneously. The only option would be to create independent copies of the contact, but then one has to remember to update each of the copies in case something needs to be changed.