-
Notifications
You must be signed in to change notification settings - Fork 7
Issue 53431: Data Class and Sample Type data doesn't round-trip via folder export/import for field names with special char #6840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release25.7-SNAPSHOT
Are you sure you want to change the base?
Conversation
…older export/import for field names with special char - use ColumnHeaderType.ImportField instead of FieldKey for writing folder archive tsv data column headers
@@ -3768,7 +3768,7 @@ public List<PlateFileBytes> exportPlateData(Container c, User user, ContainerFil | |||
try (TSVGridWriter writer = new TSVGridWriter(plateQueryView::getResults, displayColumns, Collections.singletonMap(sampleIdNameFieldKey.toString(), "Sample ID"))) | |||
{ | |||
writer.setDelimiterCharacter(delim); | |||
writer.setColumnHeaderType(ColumnHeaderType.FieldKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main question is about the usage of these different ColumnHeaderType
. Reading through the comments that surround them I'm still not sure which one to choose in which situation.
It looks like up to this point all the usages of ImportField
align with usage in import templates, however, there are other usages of ColumnHeaderType.FieldKey
that would seem to align with what you're using them for here.
Is ImportField
just the new and improved FieldKey
that we should be using more widely (I assume not)? I may be off-base here as you may have already discussed with @labkey-susanh who looks to familiarity with this enumeration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I agree. This enum is confusing. The comment for FieldKey
, which has been there since 2015 saying "Useful for import/export round-tripping" is wrong. We do not support FieldKey on import (see my attempt to add it here #6270). Maybe it is time to remove that part of the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ImportField
was added specifically because, as Cory said, round-tripping with FieldKey
doesn't work currently. Given this, I'm not sure when FieldKey
is useful as a column header type. Perhaps it worked at some point, but I doubt it. Since this targets 25.7, we shouldn't remove it altogether here, I think, but might consider that for develop.
…/export round-tripping" since that isn't the case
@@ -3768,7 +3768,7 @@ public List<PlateFileBytes> exportPlateData(Container c, User user, ContainerFil | |||
try (TSVGridWriter writer = new TSVGridWriter(plateQueryView::getResults, displayColumns, Collections.singletonMap(sampleIdNameFieldKey.toString(), "Sample ID"))) | |||
{ | |||
writer.setDelimiterCharacter(delim); | |||
writer.setColumnHeaderType(ColumnHeaderType.FieldKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ImportField
was added specifically because, as Cory said, round-tripping with FieldKey
doesn't work currently. Given this, I'm not sure when FieldKey
is useful as a column header type. Perhaps it worked at some point, but I doubt it. Since this targets 25.7, we shouldn't remove it altogether here, I think, but might consider that for develop.
Rationale
https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=53431
Related Pull Requests
Changes
Tasks