Skip to content

Create script populateProjects.js #1992

@JackHaeg

Description

@JackHaeg

Overview

The project.managedByUsers array is empty. We need a script that will populate this array with all of the data held in the user.managedProjects array for each user.

Action Items

  • Clone the users column in the dev database to a new test database
  • Create an ipython notebook that will query the database for all of the users where their user.managedProjects array has at least one value.
  • Run test script on cloned data
  • Create an object of Projects, where the key is the project ID and the value is an array of user IDs
  • For each of the projects, update the database to have their managedByUsers array equal to the created array of users.
  • In the backend/package.json file, create a script entry populate-projects that will run this new script (e.g., node populateProjects.js
  • Create unit tests proving the above functionality
    • Create test data
    • Demonstrate that test data object merges as expected, resulting in key<project ID>: [<userID>] (array of users)

Resources/Instructions

Metadata

Metadata

Assignees

Type

Projects

Status

In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions