nextcloud / nextcloud/contacts

Add configurable contact versioning with field-level comparison and selective restoration

Open
#5,680 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement
Dominant language
JavaScript
Stars
642
Forks
220
Avg merge
14h 39m
Merged PRs (30d)
51

Description

Is your feature request related to a problem? Please describe.

The Activity reports that a contact has been modified, but it is not possible to determine what exactly changed. The previous values are not shown, and there is no way to restore the contact to its previous state.

This is especially problematic when an address book is shared over a group and contacts are synchronized across multiple devices or edited accidentally. A phone number, email address, postal address, note, contact photo, or another property may be overwritten without any way to identify or recover the previous value.

This request is not only about recording that a contact was modified. It specifically requires contact-content versioning, field-by-field comparison, and selective restoration of individual contact properties.

Describe the solution you'd like

Proposed solution

Implement configurable versioning for contacts, similar to versioning in Nextcloud Files.

Whenever a contact is changed, a new version should be created automatically. The version history should contain the complete previous vCard data and allow users to inspect changes at field level.

Users should be able to:

  1. View the complete version history of a contact.
  2. See when each version was created.
  3. Compare a previous version with the current contact.
  4. See which individual fields changed.
  5. Restore the complete contact to a previous version.
  6. Restore only one or more selected fields from a previous version.
  7. Preview the result before applying a restoration.
  8. Export a previous version as a .vcf file.

Configurable version retention

Version retention should work similarly to versioning in Nextcloud Files.

The number of retained previous versions should be configurable. The configuration should support:

  • enabling or disabling contact versioning.
  • setting the maximum number of previous versions retained per contact.
  • automatically deleting the oldest versions when the configured limit is exceeded.
  • a global administrator setting.
  • optionally, a user-level setting if supported by the application.
  • preventing unlimited growth of database and file storage.

Field-level comparison

The comparison view should show changes per field.

For every changed property, the history should show:

  • the field or property name.
  • the previous value.
  • the new value.
  • the date and time of the change.
  • and, if available, the client or source that made the change.

Selective restoration

The restoration interface should provide at least the following options:

  • restore the complete previous contact version.
  • restore one selected field.
  • restore multiple selected fields.
  • preview the resulting contact before applying the restoration.
Describe alternatives you've considered

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by mapping the contact persistence and interface areas, then read the existing Nextcloud Files versioning behavior for comparison. The scope is complete only when configurable history, field-level comparison, selective or full restoration, preview, export, and retention are defined and covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.