Skip to content

Conversation

@XingY
Copy link
Contributor

@XingY XingY commented Jul 31, 2025

Rationale

This PR skip File converter for Attachment columns for import and allow string values to be rejected/validated during AttachmentDataIterator processing. The only time AttachmentDataIterator would accept a string attachment currently is during list archive import, where the attachment parents are set. There will be a follow up PR that addresses QUS of attachment.

Related Pull Requests

Changes

@XingY XingY self-assigned this Jul 31, 2025
@labkey-chrisj
Copy link
Contributor

Manual testing notes

  • Any attempt to update-from-file to an attachment field gets this helpful error:
image
  • This is true of update from excel, csv, tsv
  • I tried the same scenario in Biologics and got the same results there
  • merge is the same way

classesToTest.add(0, knownColumnClass);

// Issue 49830: if we know the column class is File based on the columnInfoMap, use it instead of trying to infer the class based on the data
if (setFileColDescriptor(colDescs[f], knownColumn))
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like this could come before the setting of knownColumnClass.

}

// use File converter for known file fields even if inferTypes = false. If inferTypes, this is already done.
if (!getInferTypes())
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like you could leave off the if statement here for a cleaner read since setting again won't hurt, but this is slightly more efficient.

@XingY XingY merged commit 295b210 into release25.7-SNAPSHOT Aug 4, 2025
9 checks passed
@XingY XingY deleted the 25.7_fb_issue53498 branch August 4, 2025 19:15
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