Skip to content

fix(contacts): create new contacts in the selected address book - #5764

Open
whoalin1 wants to merge 1 commit into
nextcloud:mainfrom
whoalin1:fix-activity-addressbook-on-create
Open

whoalin1 wants to merge 1 commit into
nextcloud:mainfrom
whoalin1:fix-activity-addressbook-on-create

Conversation

@whoalin1

@whoalin1 whoalin1 commented Oct 6, 2026 •

Copy link
Copy Markdown

Summary

Saving a new contact after changing the address-book dropdown created the vCard in the current/default book and then moved it. Activity therefore showed the temporary book instead of the one the user selected.

For unsaved contacts (!dav), move locally into the target book before createVCard so Activity credits the final address book. Existing contacts still update then move.

Closes #5757

Test plan

  • Two address books A (default) and B; from All contacts / A, New contact → switch dropdown to B → Save → contact lives in B; Activity says created in B (not A)
  • Same flow starting already inside B → Save → Activity still B; no double move
  • Edit existing contact in A, change to B, Save → contact moves to B (regression)
  • New contact without changing address book → still creates in the expected book

AI disclosure

This PR was drafted with the help of AI coding assistants (Cursor agents / LLM-based tools), including the description. I am responsible for it and happy to rework anything that doesn't fit.

All commits carry an Assisted-by: Cursor:grok-4.7 trailer.

Assisted-by: Cursor:grok-4.7
Signed-off-by: whoalin1 <whoalin414@gmail.com>
@whoalin1
whoalin1 force-pushed the fix-activity-addressbook-on-create branch from 6afa4d8 to dee595a Compare October 9, 2026 14:13

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Activity shows contact being created in the wrong address book

1 participant