Pair any card in the chosen address books with a contact, a company, a department or the account holder, and keep both in step #8
Labels
No labels
bug
documentation
enhancement
performance
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-dav#8
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The plugin pairs cards with contacts only, and nobody chooses: every contact is pushed to the one configured address book, and every unlinked named card there is adopted (
src/postulo_dav/sync.py:425-457,:527-550). The ask:Read here as: any card in the chosen address books (#13) can be paired, by choice, with a contact ("a person"), a company, a department or the account holder ("the user"), and kept in step (decisions 1 and 2).
What the plugin should do
Targets:
FN,N,ORG,TITLE,EMAIL, primaryTEL,URL,NOTE), plus theORGunit as the department (RFC 6350 §6.6.4),ADRas postal addresses, and numbers and links beyond the primary.KIND:orgcard (vCard 4, RFC 6350 §6.1.4) or one markedX-ABShowAs:COMPANY(vCard 3, Apple's; not tried here). Name, website and notes travel;TEL,EMAILandADRwait for postulo/postulo#329. Nextcloud's Contacts app has noKINDsupport (nextcloud/contacts#302); a company card cannot list its people (MEMBERis forKIND:grouponly, §6.6.5).FNandORG:Company;Unitonly.CARDDAV:principal-addressnames (RFC 6352 §7.1.2) where the server gives one (unverified anywhere), else one the person picks. Postulo's side:contact_details(owner)in the core'ssrc/postulo/documents/rendering.py.Rules:
KINDandVERSIONincluded.supported-address-data; vCard 3 where 4.0 is not listed (RFC 6352 §6.2.2).What is wrong today
src/postulo_dav/text.py:155-174,sync.py:498-508): an adopted phone card, once edited here, loses its address, photo, birthday, other numbers and emails, andX-properties, if the server accepts a push that also changes its UID (#7).VERSION:4.0, andsupported-address-datais never read (text.py:156); a book not listing vCard 4.0 must refuse it. Untried on iCloud.ORGcomponent is read and only the company written (text.py:160-161,:190-191), so departments are lost both ways.KINDis never read: aKIND:orgcard becomes a contact named after the company.ORGcompany leaves the contact in its old company's department (sync.py:152-154), a pairContact.cleanrefuses (src/postulo/jobs/models.py:649-655in the core).Decisions
src/postulo/resume/importing.py), never those.If-Matchguarded as today; unpair any other.SyncLinklets two records share a card. Recommended: one; a contact's company and department follow from itsORG.NOTEon a card made elsewhere. Postulo's notes are private and gather conflict records (sync.py:472-484); a pushedNOTEexposes them, a pulled one replaces them (sync.py:151). Recommended: leaveNOTEout unless the person switches it on.employer_structureis off (hidden, not deleted). Recommended: keep the pairing, sync nothing.Needs from the core
Without them only contacts are paired, by adoption; the rules above can land first. Depends on #7 and #13.
Done when
ORG:Company;Unitsets the contact's department (withemployer_structureon).supported-address-datalacks vCard 4 gets vCard 3.uv run postulo-messages extract, fr-fr and pt-pt filled on the commit (the test gates them), the 23 EU catalogues before a tag (uv run pytest -m release). New surface names mean repinning the core (pyproject.toml's dev group pins1d6cdd7e0) and extendingtests/test_surface.py.From the list of DAV plugin improvements of 2026-09-30.
From postulo/postulo-dav#14, which closed with
32cca53: one thing it asked for can only be done here.A
LANGUAGEparameter found on a card made elsewhere survives a push. The parameter is a BCP 47 language tag (RFC 6350 §5.1), and this issue is where a card is patched instead of rebuilt, so it is where one that is already there must be kept as it was written. If Postulo ever writes one of its own, it writes the tag in its canonical form, as the core does since postulo/postulo#337 (pt-BR, notpt-br).Worth a test of its own here: a card carrying
LANGUAGE=pt-BRon a property comes back from a push with it.The maintainer's list of 2026-10-02 asks for vCard 4 as the format for contact details, “a step closer to official DAV plugin”. Core issue postulo/postulo#660 puts one vCard 4 mapping in the core, offered on the plugin surface so this plugin can drop the vCard half of
text.py.Shared would be the contact properties (
FN,ORG:Company;Unit,TITLE,EMAIL,TEL,ADR,URL),KIND:orgfor companies, the person's own card, and phone numbers in international form through postulo/postulo#304. The core omitsNinstead of splittingFNascard_to_textdoes (src/postulo_dav/text.py:158-159).This issue keeps its own scope: choosing what is paired, patching cards, the UID on the link, and the vCard 3 step down.
From the list of improvements of 2026-10-02.