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
It's already possible to delete the data of an organization when the corresponding customer leaves. However, for several reasons, we may want to keep an archive of the organization for a certain time. For instance, it will be useful if the customer decides to come back, or if they contact us to find an information few months later.
Solution
Allow to archive the organizations. When archiving an organization, the admins/agents should be able to select a date to decide when the organization will be automatically deleted. It should be possible to mark the users of the organization (or some of them) as "archived" as well.
Specifications
Permission
Add a new permission to agent: "Archive the organization" (orga:manage:archive).
Form
In the organization > settings page, add a new form before the deletion form, allowing to archive the organization. The agent must be warned about the fact that all tickets will be frozen and none could be created anymore.
An optional date picker is available: "Delete on". The date must be in the future.
Two new attributes are added to the Organization entity:
archived_at (DATETIMETZ_IMMUTABLE), set to the current date when the form is submitted.
deleted_at (DATETIMETZ_IMMUTABLE) set to the selected date, always in the future.
Blocking actions
In App\Security\AppVoter, if the scope is an archived organization, return true only if the permission starts by orga:see or is orga:manage:archive.
Information
A global information must be displayed in archived organization: "This organization has been archived on XXX."
An optional information must be added when relevant: "It will be deleted on XXX."
It must be visible from all the pages under the organization. It should be possible to add this information via the templates/organization.html.twig file.
Organization lists
In App\Controller\OrganizationController::index, don't list the archived organizations.
If there are archived organizations, display a link at the bottom of the page "X archived organizations".
A new list must be created for the archived organizations ( App\Controller\Organization\ArchivesController::index).
Deleting organizations
In the App\MessageHandler\CleanDataHandler, delete the organizations marked to be deleted once the date has passed.
Estimated time
2 - 3 days
The text was updated successfully, but these errors were encountered:
Problem
It's already possible to delete the data of an organization when the corresponding customer leaves. However, for several reasons, we may want to keep an archive of the organization for a certain time. For instance, it will be useful if the customer decides to come back, or if they contact us to find an information few months later.
Solution
Allow to archive the organizations. When archiving an organization, the admins/agents should be able to select a date to decide when the organization will be automatically deleted. It should be possible to mark the users of the organization (or some of them) as "archived" as well.
Specifications
Permission
Add a new permission to agent: "Archive the organization" (
orga:manage:archive
).Form
In the organization > settings page, add a new form before the deletion form, allowing to archive the organization. The agent must be warned about the fact that all tickets will be frozen and none could be created anymore.
An optional date picker is available: "Delete on". The date must be in the future.
Two new attributes are added to the Organization entity:
archived_at
(DATETIMETZ_IMMUTABLE), set to the current date when the form is submitted.deleted_at
(DATETIMETZ_IMMUTABLE) set to the selected date, always in the future.Blocking actions
In
App\Security\AppVoter
, if the scope is an archived organization, returntrue
only if the permission starts byorga:see
or isorga:manage:archive
.Information
A global information must be displayed in archived organization: "This organization has been archived on XXX."
An optional information must be added when relevant: "It will be deleted on XXX."
It must be visible from all the pages under the organization. It should be possible to add this information via the
templates/organization.html.twig
file.Organization lists
In
App\Controller\OrganizationController::index
, don't list the archived organizations.If there are archived organizations, display a link at the bottom of the page "X archived organizations".
A new list must be created for the archived organizations (
App\Controller\Organization\ArchivesController::index
).Deleting organizations
In the
App\MessageHandler\CleanDataHandler
, delete the organizations marked to be deleted once the date has passed.Estimated time
2 - 3 days
The text was updated successfully, but these errors were encountered: