Skip to content

GitHub Issue 915: Bulk edit doesn't completely remove attachments for sources#7543

Open
XingY wants to merge 6 commits intodevelopfrom
fb_attachmentDIB
Open

GitHub Issue 915: Bulk edit doesn't completely remove attachments for sources#7543
XingY wants to merge 6 commits intodevelopfrom
fb_attachmentDIB

Conversation

@XingY
Copy link
Copy Markdown
Contributor

@XingY XingY commented Apr 3, 2026

Rationale

Attachment data iterator handles attachment insert when a value is provided for attachment column. However, it's not removing existing attachments.

Related Pull Requests

Changes

  • Remove existing attachment is new attachment value is blank or null
  • Remove existing attachment if new attachment is different from existing
  • Also use getDetails for ExistingRecord if the data type has attachment columns

@XingY XingY requested a review from labkey-susanh April 3, 2026 17:21
attachmentFiles.add(attachmentFile);
}

if ((null == attachmentFiles || attachmentFiles.isEmpty()) && oldAttachments.isEmpty())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could simplify here by initializing attachmentFiles to an empty list.

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