You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an admin user, I want to be able to delete components from the component library so that I can I manage outdated components.
Discussion
The purpose of this ticket is to make the database changes, view changes, tests and other backend changes to support "soft-delete" of Components (AKA Elements).
Soft-delete means flagging the instance in the database as being deleted but not removing the data from the database.
Component means a System Element (controls.models.Element) from the Component Library along with all the Component's associated statements (or type control_implementation_prototype and control_implementation), assignments to systems, and other related fields.
Questions to consider:
Should component statement's also get a delete flag individually or is it sufficient to know a statement is tied to a component that has a soft-delete?
Branch: component-delete
Components are tracked by the controls.models.Element. Statements associated with components have the relationship producer_elements.
Note that the soft-delete applies to deleting a Component from the Component Library. GovReady-Q already supports removing/deleting a component from a system's list of selected components. Removing a component from a system's list of selected component removes the data from the database of that relationship. (Because the component still exists in the Library, the component can quickly be added back into the list of selected components.)
At this point, only an administrator should have permission to soft-delete a component. We also want to log that a component has been marked deleted.
Why
Creating components involves lots of work. Deleting a component will remove all the statements associated with the component and will orphan all the statements from that component already assigned to systems.
It is better to first mark a component as deleted, then subsequently allow admins to purge deleted components. This allows times to see impact of deletion, allow any effective systems to choose a substitute component, etc.
By having a soft-delete on components, we will retain several UI options for communicating to users that a component has been deleted.
controls.models.Element
Add boolean field 'deleted' to element so we can exclude elements that have delete=True deleted = models.BooleanField(default=False, help_text="Mark Component as deleted")
controls.models.Statement
What statements make assumptions about producer_element?
Misc
Create a nice deleted tag (css/glyphicons)
Change count of components associated with a selected control in a system to not include statements from component marked as deleted
The text was updated successfully, but these errors were encountered:
gregelin
changed the title
Marke a Component deleted
Mark a Component deleted
Dec 20, 2021
gregelin
changed the title
Mark a Component deleted
Create soft delete on Components (e.g. Elements)
Dec 20, 2021
gregelin
changed the title
Create soft delete on Components (e.g. Elements)
Create backend support for soft delete on Components (e.g. Elements)
Dec 20, 2021
Stories
As an admin user, I want to be able to delete components from the component library so that I can I manage outdated components.
Discussion
The purpose of this ticket is to make the database changes, view changes, tests and other backend changes to support "soft-delete" of Components (AKA Elements).
Soft-delete means flagging the instance in the database as being deleted but not removing the data from the database.
Component means a System Element (controls.models.Element) from the Component Library along with all the Component's associated statements (or type control_implementation_prototype and control_implementation), assignments to systems, and other related fields.
Questions to consider:
Branch:
component-delete
Components are tracked by the controls.models.Element. Statements associated with components have the relationship
producer_elements
.Note that the soft-delete applies to deleting a Component from the Component Library. GovReady-Q already supports removing/deleting a component from a system's list of selected components. Removing a component from a system's list of selected component removes the data from the database of that relationship. (Because the component still exists in the Library, the component can quickly be added back into the list of selected components.)
At this point, only an administrator should have permission to soft-delete a component. We also want to log that a component has been marked deleted.
Why
Creating components involves lots of work. Deleting a component will remove all the statements associated with the component and will orphan all the statements from that component already assigned to systems.
It is better to first mark a component as deleted, then subsequently allow admins to purge deleted components. This allows times to see impact of deletion, allow any effective systems to choose a substitute component, etc.
By having a soft-delete on components, we will retain several UI options for communicating to users that a component has been deleted.
controls.models.Element
deleted = models.BooleanField(default=False, help_text="Mark Component as deleted")
controls.models.Statement
Misc
The text was updated successfully, but these errors were encountered: