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

Archive an organization #938

Open
marien-probesys opened this issue Jan 27, 2025 · 0 comments
Open

Archive an organization #938

marien-probesys opened this issue Jan 27, 2025 · 0 comments
Labels
ready ✅ You can work on this!
Milestone

Comments

@marien-probesys
Copy link
Member

marien-probesys commented Jan 27, 2025

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, 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

@marien-probesys marien-probesys added this to the Version 0.15 milestone Jan 27, 2025
@marien-probesys marien-probesys added the ready ✅ You can work on this! label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ✅ You can work on this!
Projects
None yet
Development

No branches or pull requests

1 participant