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

[FEATURE] campaign participation id in ke snapshots [Pix-15753] #10844

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

alicegoarnisson
Copy link
Contributor

@alicegoarnisson alicegoarnisson commented Dec 17, 2024

🎄 Problème

Dans le cadre de l'anonymisation, on veut pouvoir rattacher les enregistrements de la table knowledge-element-snapshots aux campaign participations qui leur correspondent.

🎁 Proposition

Pour cela, on ajoute une colonne campaign participation id à la table ke snapshots. On enregistre également le campaign participation id au moment de l'insertion d'un snapshot en base de données.

🎅 Pour tester

On fait un parcours sur le PixApp de la RA et on partage ses résultats.
Puis on se connecte au scalingo de la RA. On vérifie que la table ke-snapshots a bien la colonne "campaignParticipationId" remplie pour notre utilisateur.

@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

@alicegoarnisson alicegoarnisson marked this pull request as ready for review December 18, 2024 09:50
@alicegoarnisson alicegoarnisson requested a review from a team as a code owner December 18, 2024 09:50
@alicegoarnisson alicegoarnisson force-pushed the pix-15753/campaign-participation-id-in-ke-snapshots branch from 851b627 to 6dcb3f7 Compare December 18, 2024 09:51
Comment on lines 6 to 8
table.integer(COLUMN_NAME).unsigned().nullable();

table.foreign(COLUMN_NAME).references('id').inTable('campaign-participations');
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion

On pourrait tout faire en une ligne, peut s'inspirer de 20241118134739_create-organizations-profile-rewards-table.js

Copy link
Member

Choose a reason for hiding this comment

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

suggestion : on pourrait rajouter un .comment("") pour documenter le champ (en plus de le documenter dans la doc de confluence)

@@ -18,13 +18,14 @@ function _toKnowledgeElementCollection({ snapshot } = {}) {
);
}

const save = async function ({ userId, snappedAt, knowledgeElements }) {
const save = async function ({ userId, snappedAt, knowledgeElements, campaignParticipationId }) {
Copy link
Contributor

Choose a reason for hiding this comment

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

todo modifier le builder, databasebuilder.factory.Ke-snapshots

Certainement les seeds à mettre à jour pour être ISO avec le futur

Comment on lines 6 to 8
table.integer(COLUMN_NAME).unsigned().nullable();

table.foreign(COLUMN_NAME).references('id').inTable('campaign-participations');
Copy link
Member

Choose a reason for hiding this comment

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

suggestion : on pourrait rajouter un .comment("") pour documenter le champ (en plus de le documenter dans la doc de confluence)

@lionelB lionelB force-pushed the pix-15753/campaign-participation-id-in-ke-snapshots branch 2 times, most recently from 0f4d78c to f54f343 Compare December 18, 2024 14:03
@alicegoarnisson alicegoarnisson force-pushed the pix-15753/campaign-participation-id-in-ke-snapshots branch from 874cae4 to 0f3b722 Compare December 18, 2024 14:33
@alicegoarnisson alicegoarnisson force-pushed the pix-15753/campaign-participation-id-in-ke-snapshots branch from 3b9c515 to 25bde83 Compare December 18, 2024 14:51
@alicegoarnisson alicegoarnisson force-pushed the pix-15753/campaign-participation-id-in-ke-snapshots branch from a64dbc9 to b63af1a Compare December 18, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants