Mongoose srf submission - #113
Closed
AustinSMueller wants to merge 5 commits into
Closed
Conversation
- renamed application to submission request and migrated the application DAO from using Prisma to using Mongoose
- Application to Submission Request renaming for constants, verifier, DAO, helpers, and core services
- update the dependent services after submission request rename
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates submission-request persistence from the legacy Prisma Application path to a Mongoose-backed implementation while retaining existing GraphQL operation names.
Changes:
- Adds the Mongoose submission-request model, DAO, verifier, and tests.
- Rewires services, notifications, cron jobs, and approved-study integration.
- Removes legacy Application DAO/verifier code and updates terminology.
Reviewed changes
Copilot reviewed 56 out of 58 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
apps/backend/verifier/submission-request-verifier.js |
Adds SRF validation. |
apps/backend/verifier/application-verifier.js |
Removes legacy verifier. |
apps/backend/utility/study-abbrev-helpers.js |
Updates SRF terminology. |
apps/backend/test/utility/utility.service.test.js |
Renames utility tests. |
apps/backend/test/services/user.updateUserInstitution.test.js |
Updates collection mock. |
apps/backend/test/services/user.updateMyUser.test.js |
Updates collection mock. |
apps/backend/test/services/user.requestAccess.test.js |
Updates collection mock. |
apps/backend/test/services/user.listUsers.test.js |
Updates collection mock. |
apps/backend/test/services/user.listActiveDCPs.test.js |
Updates collection mock. |
apps/backend/test/services/user.listActiveCurators.test.js |
Updates collection mock. |
apps/backend/test/services/user.isUserPrimaryContact.test.js |
Updates collection mock. |
apps/backend/test/services/user.grantToken.test.js |
Updates collection mock. |
apps/backend/test/services/user.getUsersByNotifications.test.js |
Updates collection mock. |
apps/backend/test/services/user.getUsersByIDs.test.js |
Updates constructor documentation. |
apps/backend/test/services/user.getUser.test.js |
Updates collection mock. |
apps/backend/test/services/user.getFedLeads.test.js |
Updates collection mock. |
apps/backend/test/services/user.getDCPs.test.js |
Updates collection mock. |
apps/backend/test/services/user.getCollaboratorsByStudyID.test.js |
Updates collection mock. |
apps/backend/test/services/user.getAdminPBACUsers.test.js |
Updates collection mock. |
apps/backend/test/services/user.getAdmin.test.js |
Updates collection mock. |
apps/backend/test/services/user.editUser.test.js |
Updates collection mock. |
apps/backend/test/services/user.disableInactiveUsers.test.js |
Updates collection mock. |
apps/backend/test/services/user.checkForInactiveUsers.test.js |
Updates collection mock. |
apps/backend/test/services/submission-request.remindSubmissionRequestSubmission.test.js |
Migrates reminder tests. |
apps/backend/test/services/submission-request.deleteInactiveSubmissionRequests.test.js |
Migrates cleanup tests. |
apps/backend/test/services/program.service.test.js |
Uses the new DAO. |
apps/backend/test/services/notify-user.test.js |
Renames notification tests. |
apps/backend/test/services/approved-studies.test.js |
Updates SRF integration tests. |
apps/backend/test/services/approved-studies-notification-error-handling.test.js |
Migrates notification mocks. |
apps/backend/test/graphql-queries/save-application.test.js |
Uses the SRF service. |
apps/backend/test/graphql-queries/batch-job.test.js |
Migrates batch-job setup. |
apps/backend/test/dao/submission-request.update.test.js |
Tests Mongoose updates. |
apps/backend/test/dao/submission-request.revision-prune.test.js |
Tests revision pruning. |
apps/backend/test/dao/submission-request.reopen.test.js |
Tests revision reopening. |
apps/backend/test/dao/submission-request.batch-lookups.test.js |
Tests batch lookups. |
apps/backend/test/dao/dao.submission-request.test.js |
Adds core DAO tests. |
apps/backend/test/dao/dao.application.test.js |
Removes Prisma DAO tests. |
apps/backend/test/dao/application.revision-prune.test.js |
Removes legacy tests. |
apps/backend/test/dao/application.reopen.test.js |
Removes legacy tests. |
apps/backend/test/dao/application.batch-lookups.test.js |
Removes legacy tests. |
apps/backend/services/utility.js |
Renames empty-SRF helper. |
apps/backend/services/user.js |
Renames constructor dependency. |
apps/backend/services/submission.js |
Uses SRF ownership lookups. |
apps/backend/services/program-service.js |
Updates SRF organizations. |
apps/backend/services/notify-user.js |
Renames SRF notifications. |
apps/backend/services/approved-studies.js |
Uses the SRF DAO. |
apps/backend/routers/graphql-router.js |
Routes GraphQL to SRF methods. |
apps/backend/mongoose/models/submission-request.js |
Defines the Mongoose schema. |
apps/backend/domain/history-event.js |
Updates terminology. |
apps/backend/dao/utils/orm-converter.js |
Deprecates the Prisma converter. |
apps/backend/dao/submission-request.js |
Adds Mongoose SRF persistence. |
apps/backend/dao/approvedStudy.js |
Renames linked-ID lookup. |
apps/backend/dao/application.js |
Removes the Prisma DAO. |
apps/backend/constants/submission-request-constants.js |
Updates status terminology. |
apps/backend/constants/error-constants.js |
Renames SRF errors. |
apps/backend/app.js |
Migrates cron wiring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+41
to
+44
| _id: { type: String }, | ||
| name: { type: String }, | ||
| }, | ||
| { versionKey: false } |
Comment on lines
+298
to
+304
| await this.updateMany( | ||
| { _id: sourceId }, | ||
| { | ||
| nextRevisionId: replaceExistingLink ? previousNextRevisionID : null, | ||
| updatedAt: getCurrentTime(), | ||
| } | ||
| ); |
Comment on lines
+343
to
+345
| } catch (error) { | ||
| console.error('Error getting getInactiveSubmissionRequest:', error); | ||
| return []; |
| const batchService = new BatchService(s3Service, config.sqs_loader_queue, mockAwsService, config.prod_url, mockFetchDataModelInfo); | ||
| const emailParams = {url: config.emails_url, officialEmail: config.official_email, inactiveDays: config.inactive_application_days, remindDay: config.remind_application_days}; | ||
| const dataInterface = new Application(logCollection, applicationCollection, null, submissionService, batchService, userService, dbService, notificationsService, emailParams, null, null, null, null); | ||
| const dataInterface = new SubmissionRequest(logCollection, submissionRequestCollection, null, submissionService, batchService, userService, dbService, notificationsService, emailParams, null, null, null, null); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.