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

change clean duplication logic #152

Merged
merged 1 commit into from
Dec 16, 2024
Merged

change clean duplication logic #152

merged 1 commit into from
Dec 16, 2024

Conversation

ajeanneney
Copy link
Collaborator

  • considérer qu'une décision est identique en fonction de son externalId (pareil que sourceId+sourceName mais plus simple)
  • Ne pas prendre en compte les documents rejected (est-ce qu'il faudra les supprimer un jour ?)
  • le seul critère qui subsite pour savoir quel document on conserve est la dateCreation, on conserve le document le plus récent

const documents = await documentRepository.findAll();
const sortedDocuments = documents.sort(compareDocumentsByStatus);
const documents = (await documentRepository.findAll()).filter(
(doc) => doc.status !== 'rejected',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: j'ai vu que le script cleanDuplicatedDocuments se lancer aussi au moment de l'exportRejectedDocument... à supprimer comme convenu avec toi.

Copy link
Collaborator

@Bouba-cassation Bouba-cassation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tester et valider

@ajeanneney ajeanneney merged commit b4013ed into dev Dec 16, 2024
1 check passed
@ajeanneney ajeanneney deleted the improve-clean-duplication branch December 16, 2024 10:01
Bouba-cassation added a commit that referenced this pull request Jan 16, 2025
* Add zoning to seed TJ documents (#153)

* format seed json

* add zoning for tj documents

---------

Co-authored-by: Antoine Jeanneney <[email protected]>

* change clean duplication logic (#152)

Co-authored-by: Antoine Jeanneney <[email protected]>

* feat: fakeData refresh date (#156)

* fix: refreshDate (#157)

* fetch TCOM decisions (#155)

Co-authored-by: Antoine Jeanneney <[email protected]>

---------

Co-authored-by: Antoine Jeanneney <[email protected]>
Co-authored-by: Antoine Jeanneney <[email protected]>
Co-authored-by: juliengrach-cassation <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants