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

Ensure participant properties at site metadata #658

Closed

Conversation

Elkrival
Copy link
Collaborator

@Elkrival Elkrival commented Feb 29, 2024

closes #661
This pr ensures that the participant that is stored has all the properties to render

* This fixes a bug that when a participant is stored it stored itas a string and not an object
@Elkrival Elkrival changed the title metadata bugfix Ensure participant properties at site metadata Feb 29, 2024
$addToSet: {
participants: {
Active: 1,
Consent: new Date(),

Choose a reason for hiding this comment

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

Should this be a date from the metadata, or do we track consent based on upload date?

Comment on lines +78 to +84
participants: {
Active: 1,
Consent: new Date(),
study,
participant,
synced: new Date(),
},

Choose a reason for hiding this comment

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

does it matter that participants is no longer a participant, but now contains a participant?

Thinking of a scenario where something like participants.name used to work, but now it would need to be participants.participant.name

can/should we spread participant?

Suggested change
participants: {
Active: 1,
Consent: new Date(),
study,
participant,
synced: new Date(),
},
participants: {
Active: 1,
Consent: new Date(),
study,
synced: new Date(),
...participant,
},

Also just based on participants being plural, should this be an array of participant objects?

@mikestone14
Copy link
Collaborator

closing because this will be handled in #665

@mikestone14 mikestone14 deleted the store-participant-with-missing-properties branch March 11, 2024 13:39
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.

inject participant and site metadata when no site metadata is available
4 participants