Skip to content

GitHub Issue 1474: block reserved fields to be used as import alias - #7942

Merged
XingY merged 2 commits into
release26.8-SNAPSHOTfrom
26.8_fb_issue_1474
Aug 18, 2026
Merged

GitHub Issue 1474: block reserved fields to be used as import alias#7942
XingY merged 2 commits into
release26.8-SNAPSHOTfrom
26.8_fb_issue_1474

Conversation

@XingY

@XingY XingY commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

@labkey-susanh labkey-susanh left a comment

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.

Should also add a test for this.

@labkey-susanh

Copy link
Copy Markdown
Contributor

It would be a bigger change, but should we be throwing an error during import when an alias overlaps with a reserved name?

@XingY
XingY merged commit b7055fd into release26.8-SNAPSHOT Aug 18, 2026
9 checks passed
@XingY
XingY deleted the 26.8_fb_issue_1474 branch August 18, 2026 17:47
results.put("maxObjectObjectId", new SqlSelector(schema, "SELECT MAX(ObjectId) FROM exp.Object").getObject(Long.class));
results.put("maxMaterialRowId", new SqlSelector(schema, "SELECT MAX(RowId) FROM exp.Material").getObject(Long.class));

results.put("domainFieldsWithContainerAlias", new SqlSelector(schema, "SELECT COUNT(*) FROM exp.propertydescriptor WHERE LOWER(importaliases) = 'container' OR importaliases ILIKE '%, container' OR importaliases ILIKE 'container, %' OR importaliases ILIKE '%, container, %'").getObject(Long.class));

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.

Are we confident enough that these will be separated by , ? DomainUtil is tolerant of a variety of separators, including, spaces ,semicolons, and commas with no spaces.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Based on ColumnRenderPropertiesImpl.convertToString, ", " is the only delimiter when saving to DB. The parser is more lenient and accepts semicolon, space, tab, etc. It's an unlikely scenario that Container will be used in a multi alias setting that bypasses the default save. The risk of under reporting here is probably acceptable.

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