Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(#373): merge-contacts action #647

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

kennsippell
Copy link
Member

@kennsippell kennsippell commented Nov 23, 2024

Description

#373

This adds new action cht merge-contacts. The change proposes to:

  • Move the code for move-contacts into a library lib/hierarchy-operations with interfaces move and merge
  • Parameterize the move-contacts code changing logic for: input validation, deletes the top-level contact, changes how lineages are updated, and adds report reassignment. All else remains unaltered.

Handles reports and contacts only. Unclear what other doc types I should be worried about.

Things I still need to do. Thinking to do them in their own PRs.

  • Add an option which deletes the primary contact so resulting areas don't have two duplicates contacts
  • Update upload-docs so it handles user accounts when deleting a document
  • Add some metadata onto documents when they get moved

Code review items

  • Readable: Concise, well named, follows the style guide, documented if necessary.
  • Documented: Configuration and user documentation on cht-docs
  • Tested: Unit and/or integration tests where appropriate
  • Backwards compatible: Works with existing data and configuration. Any breaking changes documented in the release notes.

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

When combined with 'upload-docs' this action merges multiple contacts and all their associated data into one.

${bold('USAGE')}
cht --local merge-contacts -- --keep=<keep_id> --remove=<remove_id1>,<remove_id2>
Copy link
Member Author

@kennsippell kennsippell Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Struggling with the interface here. I've gone through:

  • sources/destination
  • remove/keep
  • losers/winner

Welcome suggestions that seem intuitive.

@kennsippell kennsippell changed the title New Merge-Contacts Action Merge-Contacts Action Nov 23, 2024
@kennsippell kennsippell changed the title Merge-Contacts Action feat(#373): merge-contacts action Nov 23, 2024
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.

1 participant