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

Two options for deleting a topic - include "related relationships" or not #807

Open
ianco opened this issue Jan 23, 2025 · 1 comment
Open
Assignees

Comments

@ianco
Copy link
Contributor

ianco commented Jan 23, 2025

Currently when deleting a topic, all data for the topic is deleted, and in addition "related topics" are also deleted (relationship credentials that are "owned" by other companies, but are for relationships to the company in question (the company being deleted)).

If the company is being permanently deleted from OrgBook (e.g. it was posted to OrgBook by mistake, or the source company was deleted in BC Reg) then this is correct behaviour.

If the company is to be re-processed, then these relationships will eventually be added back (the BC Reg issuer will automatically include "related companies" during processing). This seems to work most of the time, however there seems to be some edge case scenarios where the relationships don't get re-added. (In which case they show up on the next audit report as "mis-matched relationships").

It would be better to be able to specify two types of "delete topic" when deleting a topic:

  1. Delete permanently - delete everything related to the company because it's not coming back (this is basically the current functionality)
  2. Delete (but it will be reprocessed and re-added) - in this scenario the "related relationships won't need to be deleted.

Add a new option to the "delete topic" function to be able to specify one of these two options.

Also update the audit script to specify which of the two options to use (the audit script generates the commands required to fix any data issues), and update the "orgbook-configurations" to support the two options.

@WadeBarnes
Copy link
Member

WadeBarnes commented Jan 23, 2025

Likely best to do that with an optional flag on the ./manage deleteTopic command. Something like ./manage deleteTopic --hard for permanent delete (scenario 1, current behavior), and make the default behavior be the delete for reprocessing behavior (scenario 2) since we'll be doing that more often.

That should also eliminate the need to specify which version of the command to use in the audit report, since the audit report would never be recommending a permanent (hard) delete. It's always going to be providing recommendations based on the assumption the records need to be reprocessed.

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

No branches or pull requests

3 participants