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

[Enhancement] Add a soft delete button to locations. #1377

Open
Tracked by #1372
dubdabasoduba opened this issue Apr 18, 2024 · 2 comments
Open
Tracked by #1372

[Enhancement] Add a soft delete button to locations. #1377

dubdabasoduba opened this issue Apr 18, 2024 · 2 comments
Assignees
Labels
Blocked Issue relies on something else to be fixed EUSM Large 4-5 days Location Management Needs Scoping Indicates that a ticket needs more scoping

Comments

@dubdabasoduba
Copy link
Member

dubdabasoduba commented Apr 18, 2024

Add a delete button to locations. If we can determine that a location is a parent or a leaf node, hide or show the delete button respectively. Attempt to delete locations when users click this button. Inform users if location cannot be deleted. Research on possibility of cascading deletes to deal with data integrity errors when attempting to delete a location that is a parent of other locations

Edit:
Changing this to be a soft delete, so we just need to change the status to inactive. A few considerations for this case:

  • Adding a filter on web that filters for locations based on the status. Check fhir spec for possible values for status.
  • Handling soft deletion of parent locations. Do we need to cascade the status change to children. Where to handle this on the web or on the backend? Also what should be the behavior once a parent location is activated?
@dubdabasoduba dubdabasoduba changed the title [Enhancement] Add a delete button to locations. If we can determine that a location is a parent or a leaf node, hide or show the delete button respectively. Attempt to delete locations when users click this button. Inform users if location cannot be deleted. Research on possibility of cascading deletes to deal with data integrity errors when attempting to delete a location that is a parent of other locations. [Enhancement] Add a soft delete button to locations. Apr 18, 2024
@dubdabasoduba dubdabasoduba added Location Management Needs Scoping Indicates that a ticket needs more scoping labels Apr 18, 2024
@dubdabasoduba dubdabasoduba added this to the [EUSM] Fierce Cardano milestone May 7, 2024
@dubdabasoduba dubdabasoduba self-assigned this May 31, 2024
@peterMuriuki
Copy link
Collaborator

peterMuriuki commented May 31, 2024

Since we want to implement soft deletion

Possible quick wins alternatives:

  • automatically hide inactive resources (on query)
  • Use table sort
  • scoped table filters Add single filter for active/iinactive resources

Long term fixes:

  • Add table filters

@peterMuriuki peterMuriuki added the Blocked Issue relies on something else to be fixed label Jun 8, 2024
@peterMuriuki peterMuriuki removed this from the [EUSM] Legendary Bitcoin milestone Jun 8, 2024
@AnnieMungai
Copy link
Collaborator

AnnieMungai commented Jun 24, 2024

Soft deletion - discussions with @peterMuriuki @dubdabasoduba
Option 1: - cascade delete - remove the resource from the backend. Fhir supports this cascade - delete location and everything related to it including child locations, products, etc.
QQ: Can cascade delete work for only locations.
Option 2: Do not delete - have a filter to show only active locations. Active/in-active toggle. Caveats - how would this work for a location hierarchy? Location hierarchy does not do this - we can add it as part of the server-side work.
QQ: How do we define the behavior for the nested child locations?
How does this translate to the data - when we have a deactivated parent and an active child?
Option 3: Add this to the back-end - add custom stuff to the gateway. We must be clear about the custom stuff and how it affects things.

Way forward

  • Implement the de-activating option. We still need to understand the data quality impact on this. Highlight the potential problems with this and how we are going to deal with them.
  • Deactivate the resource and not care about the trickle-down effect.
  • Review the impact of deactivating any resource on the web- e.g. products and how other modules are going to react to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked Issue relies on something else to be fixed EUSM Large 4-5 days Location Management Needs Scoping Indicates that a ticket needs more scoping
Projects
Status: To do
Development

No branches or pull requests

3 participants