Fix: Copied attachments throw not_scanned error when opened - #599
Merged
Merged
Conversation
akgarg06
had a problem deploying
to
pr-analysis
September 24, 2026 13:20 — with
GitHub Actions
Failure
akgarg06
had a problem deploying
to
pr-analysis
September 24, 2026 13:20 — with
GitHub Actions
Failure
akgarg06
had a problem deploying
to
pr-analysis
September 24, 2026 13:23 — with
GitHub Actions
Failure
akgarg06
had a problem deploying
to
pr-analysis
September 24, 2026 13:23 — with
GitHub Actions
Failure
akgarg06
had a problem deploying
to
pr-analysis
September 24, 2026 13:33 — with
GitHub Actions
Failure
akgarg06
had a problem deploying
to
pr-analysis
September 24, 2026 13:33 — with
GitHub Actions
Failure
akgarg06
had a problem deploying
to
pr-analysis
September 24, 2026 13:41 — with
GitHub Actions
Failure
akgarg06
had a problem deploying
to
pr-analysis
September 24, 2026 13:41 — with
GitHub Actions
Failure
akgarg06
marked this pull request as ready for review
September 24, 2026 13:50
This reverts commit 798f220.
akgarg06
had a problem deploying
to
pr-analysis
September 24, 2026 13:53 — with
GitHub Actions
Failure
yashmeet29
approved these changes
Sep 25, 2026
rashmiangadi05
approved these changes
Sep 25, 2026
This branch was successfully deployed
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.
Describe your changes
{"error":{"code":"not_scanned",...}}error thrown when opening attachments from copied sourcing eventscreateDraftEntriesinserted records viaDraftService.newDraft()which routes through CAP's handler chain —@readonlyfields (status,scannedAt) get stripped, causing HANA to apply the column default'Unscanned'newDraft(insert), a follow-uppersistenceService.run(Update)writesstatus = 'Clean'andscannedAt = current timestampdirectly to the draft table, bypassing@readonlyenforcementRoot Cause Detail
New uploads are unaffected because
addAttachmentToDraftusespersistenceService.run()directly (bypasses CAP handler chain).Files Changed
sdm/src/main/java/.../service/handler/SDMCustomServiceHandler.javapersistenceServiceafternewDraftto writestatus='Clean'andscannedAt=now()directly to the draft tableType of change
Please delete options that are not relevant.
Checklist before requesting a review
Upload Screenshots/lists of the scenarios tested
Single Tenant test cases : https://github.com/cap-java/sdm/actions/runs/36109446454
Multi Tenant test cases: https://github.com/cap-java/sdm/actions/runs/36139011245