Purav taking over for Sohail - Job form issues backend - #2318
Closed
bfire9989 wants to merge 2 commits into
Closed
Conversation
- Rename teamCode to teamName across WeeklyGrading schema, controller, and index - Normalize save dates to Sunday midnight UTC to prevent duplicate records - Update GET /api/weekly-grading to accept weekStart param for week range queries - Add DELETE /api/weekly-grading/reviewer endpoint for reviewer removal - Add POST /api/pr-grading-config/sync-reviewers to auto-populate team configs from SQ submissions, excluding promoted team members, split by last name A-M/N-Z - Calculate prsNeeded from userProfile.weeklycommittedHours - Add controller tests for weeklyGradingController and prGradingConfigController
… confirmation, and resume upload
This was referenced Sep 3, 2026
Contributor
|
now taken over by #2333 |
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.
Description
Implements # (Priority High) — Backend support for the Job Application Page (
/job-application) form. This PR adds all server-side functionality required by the frontend job application form fixes.Related PRs
This backend PR is related to the #5469 frontend PR.
Main changes explained
jobApplicationsModel.js— addedemail(String) andresumeUrl(String) fields to the response schema, required for duplicate detection and resume storagejobsController.js— addedgetActiveJobPositions, queriesJob.distinct('title')and returns{ positions: [...] }sorted alphabetically for the frontend dropdownjobsRouter.js— wired/positionstogetActiveJobPositions; preserved oldgetPositions(JobPositionCategory) under/position-categories; fixed route ordering so named routes appear before/:idcollaborationController.js— addedsubmitFormResponse: returns400on missing fields,404if form not found,409on duplicate email per form, handles optional resume upload to Azure Blob Storage (non-fatal), parsesanswersas either array or JSON string (multipart support), sends confirmation email viaemailSenderafter save (non-fatal), returns201on successcollaborationRouter.js— addedPOST /jobforms/:formId/responseswithupload.single('resume')multer middlewaremiddleware.js— added public exemption forPOST /api/jobforms/:id/responsesso external applicants can submit without a JWT tokenHow to test
Refer to the frontend PR (#5469) for full setup and step-by-step testing instructions. The frontend PR must be checked out and running alongside this backend PR to test end-to-end.
To verify backend behaviour directly via Postman or Insomnia:
GET /api/jobs/positions— should return{ positions: ["Title A", "Title B", ...] }from the jobs collectionPOST /api/jobforms/:formId/responseswith validrespondent,email, andanswers— should return201and trigger a confirmation email409 Conflictrespondentoremail— should return400formId— should return404multipart/form-data— verifyresumeUrlis saved on the response document in the DBScreenshots or videos of changes
Note
Email sending and resume upload are both non-fatal — a failure in either will not block the
201response. Check server logs if emails are not arriving or resume URLs are not saving.