Issue 45532: LKSM: Using file import to bulk update errors when required fields aren't present

issues
Status:open
Assigned To:Susan Hert
Type:Defect
Area: 
Priority:3
Milestone:22.09
Opened:2022-05-20 12:21 by hannahb
Changed:2022-07-11 10:28 by hannahb
Resolved:
Resolution:
Support Ticket: 
Pull Requests:
Closed:
2022-05-20 12:21 hannahb
Title»LKSM: Using file import to bulk update errors when required fields aren't present
Assigned To»Susan Hert
Notify»Bernie;hannahb
Type»Defect
Priority»2
Milestone»22.06
To repro:

- Create a Sample type with a required field (eg. sampleDate)
- Create a couple samples
- Create a file that has the sample IDs and storage location fields (does not include sampleDate)
- Import file with "Update" selected

You get an error that sampleDate is required. Since the sampleDate is already filled out, and we're just updating the storageLocation (and not including the sampleDate fields in the file), I would expect this to work.

Similarly, this is happening with aliquots and the AliquotedFrom field during an update. Let me know if I should file an issue on this.

2022-05-27 11:17 Susan Hert
Assigned ToSusan Hert»triage
NotifyBernie;hannahb»Bernie;hannahb;xyang;Matthew Bellew
The required field part of this is slightly different from the AliquotedFrom field. When fields are required, we currently do that check long before we start iterating on the data (just checking if the column is provided at all). Since an import can include both new and updated columns, we can't just skip that validation when doing a merge. We would have to do something like: If the field is required and the column is not present, check if any of the rows provided are new rows and then throw an error. This will have some performance impact for doing the update, but perhaps it's not too significant.

For the AliquotedFrom field, the check is a little different. We need this field in order to know if the field is an aliquot or not so we know which fields are relevant for updating. In the case when it is an existing aliquot, we may already know enough, or we could simplify the requirement to just the IsAliquot field instead. Requires a little more investigation.

Is this needed for 22.6?

2022-05-27 15:36 hannahb
Assigned Totriage»hannahb
Milestone22.06»22.07
I think we can push to 22.7 or later - let me think a bit more before formally prioritizing.

2022-07-11 10:28 hannahb
Assigned Tohannahb»Susan Hert
Priority2»3
Milestone22.07»22.09
This came up again with another couple clients so I think it's worth looking into. Setting priority and milestone but we can discuss