Skip to content

fix: correct paste misalignment when using shuffled projection (T1329)#2325

Merged
boris-w merged 2 commits into
developfrom
fix/paste-misalignment-with-projection
Dec 23, 2025
Merged

fix: correct paste misalignment when using shuffled projection (T1329)#2325
boris-w merged 2 commits into
developfrom
fix/paste-misalignment-with-projection

Conversation

@boris-w
Copy link
Copy Markdown
Contributor

@boris-w boris-w commented Dec 23, 2025

Related Issues: T1329

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a paste misalignment bug that occurred when using shuffled field projections (issue T1329). When projection was specified, the fields were being incorrectly reordered by subsequent view processing logic, causing pasted data to be written to the wrong columns.

  • Fixed the early return logic in getFieldsByQuery to prevent projection results from being processed by viewId logic
  • Added comprehensive test coverage for paste operations with various projection scenarios

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
apps/nestjs-backend/src/features/field/field.service.ts Changed projection handling to return immediately instead of continuing to viewId processing, preventing field reordering that caused paste misalignment
apps/nestjs-backend/test/selection.e2e-spec.ts Added comprehensive E2E test suite covering paste operations with shuffled, reversed, and offset projections to verify the fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@boris-w boris-w merged commit bfc4202 into develop Dec 23, 2025
11 checks passed
@boris-w boris-w deleted the fix/paste-misalignment-with-projection branch December 23, 2025 07:41
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Environment Cleanup

@coveralls
Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 20454531600

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 5 of 5 (100.0%) changed or added relevant lines in 2 files are covered.
  • 20 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.006%) to 71.822%

Files with Coverage Reduction New Missed Lines %
apps/nestjs-backend/src/features/record/record.service.ts 2 76.73%
apps/nestjs-backend/src/features/base/base-import-processor/base-import-csv.processor.ts 3 70.87%
apps/nestjs-backend/src/features/integrity/link-integrity.service.ts 15 70.88%
Totals Coverage Status
Change from base Build 20451302749: 0.006%
Covered Lines: 59620
Relevant Lines: 83011

💛 - Coveralls

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.

3 participants