Issue 45739: LKSM: Converting a .xlsx to .csv causes LK not to recognize the Sample ID field

issues
Status:closed
Assigned To:Guest
Type:Defect
Area: 
Priority:4
Milestone:22.07
Opened:2022-06-21 16:04 by hannahb
Changed:2022-06-30 11:54 by hannahb
Resolved:2022-06-29 07:39 by Susan Hert
Resolution:Fixed
Support Ticket: 
Pull Requests:inventory#469
biologics#1405
labkey-ui-components#879
sampleManagement#1056
Closed:2022-06-30 11:54 by hannahb
2022-06-21 16:04 hannahb
Title»LKSM: Converting a .xlsx to .csv causes LK not to recognize the Sample ID field
Assigned To»Susan Hert
Notify»hannahb
Type»Defect
Priority»4
Milestone»22.08
This feels fairly low priority, although a client did report this:

Export some samples from a Sample Type grid as Excel
Make some updates to the samples
Save the file as a .csv
Try and import file+update data - error: Sample ID is an unknown field and will be ignored.

If I keep the file as an Excel, this works fine. If I export the file as a csv, also works fine.

Expectation is that the file type wouldn't have an impact on the Sample ID field name, and I'm not seeing any differences from the file point of view

2022-06-28 09:24 Susan Hert
TitleLKSM: Converting a .xlsx to .csv causes LK not to recognize the Sample ID field»**LKSM: Converting a .xlsx to .csv causes LK not to recognize the Sample ID field
Pull Requests»https://github.com/LabKey/inventory/pull/469 https://github.com/LabKey/biologics/pull/1405 https://github.com/LabKey/labkey-ui-components/pull/879 https://github.com/LabKey/sampleManagement/pull/1056
Problem here is really a bug in Excel, I believe, but we can get around it. When the csv is created, an extra Zero Width No-Break Space character (0xFEFF) is added before the "Sample ID" header. We get around this by doing a trim on the provided field name when looking for the appropriate column

2022-06-29 07:39 Susan Hert
resolve as Fixed
Title**LKSM: Converting a .xlsx to .csv causes LK not to recognize the Sample ID field»LKSM: Converting a .xlsx to .csv causes LK not to recognize the Sample ID field
Statusopen»resolved
Assigned ToSusan Hert»hannahb
Milestone22.08»22.07
Merged to develop

2022-06-30 11:54 hannahb
close
Statusresolved»closed
Assigned Tohannahb»Guest
Verified