Skip to content

Relax column validation for All Projects and Active Projects imports - #150

Merged
sprucely merged 1 commit into
mainfrom
swe/project-import-columns
Nov 23, 2026
Merged

sprucely merged 1 commit into
mainfrom
swe/project-import-columns

Conversation

@sprucely

@sprucely sprucely commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Allow All Projects files to omit Project Director and Document Type or leave their values blank. Skip unrecognized columns in Active Projects files and list them in the import success message.

Summary by CodeRabbit

  • New Features
    • Successful imports now report any unrecognized columns that were skipped, while still showing the imported row count and filename.
    • Active-project imports can skip extra columns and rows containing only values in those columns.
    • All-project imports can omit Project Director and Document Type columns or leave their values blank.
  • Bug Fixes
    • Missing or ambiguous required headers are identified before import data is processed.

Allow All Projects files to omit Project Director and Document Type or leave their values blank. Skip unrecognized columns in Active Projects files and list them in the import success message.
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The import changes make two all-projects fields optional and add configurable handling of unknown active-projects headers. Successful imports return ignored header names, which the import panel and workflow checklist display when present.

Changes: Flat-file import

Layer / File(s) Summary
Optional all-projects fields
database/data/Tables/AllProjects.sql, server/Import/FlatFileImportRegistry.cs, tests/server.tests/Import/FlatFileImportServiceTests.cs, tests/server.tests/SqlIntegration/FlatFileImportSqlIntegrationTests.cs, client/src/test/components/FlatFileImportPanel.test.tsx
ProjectDirector and DocumentType are optional for all-projects imports and nullable in the table. Tests cover omitted headers, blank values, and validation of other required fields.
Ignored-header reporting
server/Import/ImportDatasetDefinition.cs, server/Import/FlatFileImportRegistry.cs, server/Import/FlatFileImportService.cs, server/Models/Imports/ImportResponses.cs, client/src/components/FlatFileImportPanel.tsx, client/src/test/components/FlatFileImportPanel.test.tsx, tests/server.tests/Import/FlatFileImportServiceTests.cs, tests/server.tests/SqlIntegration/FlatFileImportSqlIntegrationTests.cs
Active-projects imports can ignore and report unknown headers. Successful responses include the ignored names, and both success views display them when the list is nonempty. Tests cover parsing, display, and imports with extra-column-only rows.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ImportView
  participant FlatFileImportService
  participant ImportSuccessResponse
  participant ImportSuccessSummary
  ImportView->>FlatFileImportService: Upload CSV or workbook
  FlatFileImportService->>ImportSuccessResponse: Return imported rows and ignored headers
  ImportSuccessResponse->>ImportView: Provide successful import result
  ImportView->>ImportSuccessSummary: Render success result
  ImportSuccessSummary->>ImportView: Display skipped columns when present
Loading
Merge Risk: Minimal · up to 31739

All Projects imports may now omit or leave blank the Project Director and Document Type columns, and Active Projects imports skip unrecognized columns and list them in the success message. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two import types touched by the change, and the change relaxes column validation for them: All Projects no longer requires Project Director and Document Type columns, and Active Pr…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two import types touched by the change, and the change relaxes column validation for them: All Projects no longer requires Project Director and Document Type columns, and Active Projects ignores unrecognized columns and lists them in the success message. The title is specific and matches the stated objective of PR #150.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fc8a690c-2758-49ac-806a-a56de2350ea6
Commits

Reviewing files that changed from the base of the PR and between ff19c62 and 317392b.

Files selected for processing: 9

  • client/src/components/FlatFileImportPanel.tsx
  • client/src/test/components/FlatFileImportPanel.test.tsx
  • database/data/Tables/AllProjects.sql
  • server/Import/FlatFileImportRegistry.cs
  • server/Import/FlatFileImportService.cs
  • server/Import/ImportDatasetDefinition.cs
  • server/Models/Imports/ImportResponses.cs
  • tests/server.tests/Import/FlatFileImportServiceTests.cs
  • tests/server.tests/SqlIntegration/FlatFileImportSqlIntegrationTests.cs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@sprucely
sprucely merged commit acdf4c0 into main Nov 23, 2026
5 checks passed
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.

2 participants