Skip to content

[dev] [carhartlewis] lewis/comp-form-type-finding-fix#2159

Open
github-actions[bot] wants to merge 4 commits intomainfrom
lewis/comp-form-type-finding-fix
Open

[dev] [carhartlewis] lewis/comp-form-type-finding-fix#2159
github-actions[bot] wants to merge 4 commits intomainfrom
lewis/comp-form-type-finding-fix

Conversation

@github-actions
Copy link
Contributor

This is an automated pull request to merge lewis/comp-form-type-finding-fix into dev.
It was created by the [Auto Pull Request] action.

@vercel
Copy link

vercel bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Feb 18, 2026 10:28pm
portal Ready Ready Preview, Comment Feb 18, 2026 10:28pm

Request Review

@cursor
Copy link

cursor bot commented Feb 18, 2026

PR Summary

Low Risk
Small, localized change to form-type matching logic; main risk is an incomplete/incorrect mapping causing some forms to show wrong submission status.

Overview
Fixes document evidence status lookups by translating @comp/company evidence form type values to the corresponding @db EvidenceFormType enum before matching evidenceSubmission.groupBy() results.

This adds an explicit EXTERNAL_TO_DB_FORM_TYPE mapping and toDbEvidenceFormType() helper, and updates getDocumentFormStatusesForOrganization() to use the mapped DB value when finding the latest submission per form.

Written by Cursor Bugbot for commit c2f2e59. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.


function toDbEvidenceFormType(formType: EvidenceFormType): DbEvidenceFormType {
return EXTERNAL_TO_DB_FORM_TYPE[formType];
}
Copy link

Choose a reason for hiding this comment

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

Duplicated form-type mapping exists in API app

Low Severity

The EXTERNAL_TO_DB_FORM_TYPE mapping and toDbEvidenceFormType function are exact duplicates of EXTERNAL_TO_DB and toDbEvidenceFormType already defined in apps/api/src/evidence-forms/evidence-form-type-map.ts. If a new EvidenceFormType variant is added, both copies must be updated independently, creating a maintenance risk. Ideally this mapping would live in a shared location (e.g., @comp/company) or a shared internal package to avoid drift.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments