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

#419 Populate application records with diversity data #604

Conversation

HalcyonJAC
Copy link
Contributor

What's included?

When a new applicationRecord document is created in firestore, it now includes the diversity data

Who should test?

✅ Developers

How to test?

Cut off scores

  • Apply for a vacancy then process the applications from the admin.
  • Check that the diversity data is included within the applicationRecord document

Risk - how likely is this to impact other areas?

🟠 Medium risk - this does change code that is shared with other areas

Additional context


PREVIEW:DEVELOP
can be OFF, DEVELOP or STAGING

Copy link
Member

@warrensearle warrensearle left a comment

Choose a reason for hiding this comment

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

This PR looks good to me. 👍
As part of the parent ticket we will also need to address

  • keeping the data up to date
  • populating existing applicationrecords (back-filling)

Please clarify whether this will be included here or in follow-up PR(s)

@warrensearle warrensearle removed the request for review from lloback July 1, 2021 11:18
@HalcyonJAC
Copy link
Contributor Author

@warrensearle Does an application's diversity data ever change once the applications have been processed? I had assumed it doesn't but if it does I can add a db trigger to update the applicationRecord.

Also updating the existing records - we could run the existing nodeScript for this, but what is the process for doing this / other one-off migrations / data changes on the production environment? We could have a button per exercise that generates the diversity data, but it is only applicable for old exercises so could be over-kill

@KateMJAC KateMJAC merged commit 211a4ca into develop Jul 5, 2021
@KateMJAC KateMJAC deleted the feature/419-populate-application-records-with-diversity-data branch July 5, 2021 14:36
@warrensearle
Copy link
Member

Hey @HalcyonJAC we should assume that the data might be updated even after the team have started processing applications, so yes please add to the onApplicationUpdate background function to check for the relevant changes and update applicationRecord (if it exists).
This would be a good event to log so we can track how often this happens.

@warrensearle
Copy link
Member

With regards back-filling data we should only need to run the existing node script once then the new functions will take over. DM me and we can go through existing process for this.

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.

5 participants