[TECH] Rattrapage des certifications annulées (PIX-16047). #11414
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🥞 Problème
Maintenant que l’on supporte le assesment-result cancelled partout, on peut demarrer une bascule au niveau de la DATA, c'est a dire transformer les "certification-courses.isCancelled" en "assessment-results.status = cancelled"
A noter, on veut garder exactement les memes données que le precedent "assessment-result", au delta près du commentaire jury (car il y avait ou pas commentaire selon les cas de isCancelled ou non)
🥓 Proposition
🧃 Remarques
😋 Pour tester
Cas nominal
pour verifier que vous etes bien dans le bon etat, sur Pix Admin, la certification va du coup ressembler a quelque chose comme cela (l'etat avant que l'on cree notre nouvelle feature)

verifier aussi que l'etat candidat sur Pix App est OK
LOG_FOR_HUMANS=true LOG_LEVEL=debug DEBUG="knex:*" node scripts/certification/create-assessment-result-for-cancelled-certification.js --dryRun=true
dryRun=false
Cas deja assessment-result deja annule automatiquement
LOG_LEVEL=debug DEBUG="knex:*" node scripts/certification/create-assessment-result-for-cancelled-certification.js --dryRun=true