Issue 45780: LKB: Registry items (PS and NS) updating via file import failing

issues
Status:open
Assigned To:triage
Type:Defect
Area:Biologics
Priority:2
Milestone:22.08
Opened:2022-06-28 12:52 by hannahb
Changed:2022-07-27 16:55 by RosalineP
Resolved:
Resolution:
Related:45768
Support Ticket:45768
Pull Requests:
Closed:
2022-06-28 12:52 hannahb
Title»LKB: Registry items (PS and NS) updating via file import failing
Assigned To»Nick Kerr
Notify»hannahb;Bernie
Type»Defect
Area»Biologics
Priority»2
Milestone»22.08
Related»45768
Support Ticket»45768
For LKB updating protein sequences via file import:

- Create two protein sequences, PS-12 and PS-13
- Export them
- Remove all fields except Name and Common Name
- Try and update using file import >> Error: Sequence required

Add the sequence field back in (keep the sequence the same as during insert), then try and update using file import >> Error: Failed to register a new protein. "PS-13" already exists with the same identity (ips:1145).

Same behavior is exhibited with Nucleotide Sequences.

Both PS and NS can be edited in the UI via grid or bulk edit

2022-07-06 12:09 Nick Kerr
Assigned ToNick Kerr»RosalineP
Rosaline, I think this would be a good ticket to take a look at that coincides with the reclassification work. Could you triage and provide an estimate when you have a moment?

2022-07-27 16:55 RosalineP
Assigned ToRosalineP»triage
This problem came up with Molecules in the past, and the solution that was opted for was to remove the 'Update data' checkbox.
The problem is stemming from calls in ProtSequenceTriggerFactory.ProteinIdentity.beforeInsert() and NucSequenceTriggerFactory.NucleotideIdentity.beforeInsert(). In both, there's a line that calls setIdentity(), and the final parameter 'enforceUniqueIdentity' has been introduced and set to 'true' as of 3/27/22. (See PR here: https://github.com/LabKey/biologics/pull/1214)
Presumably the desired fix is not to remove the 'Update data' checkbox but instead to have the behavior working. Detangling this would optimally include being able to pass context from the import that a 'merge' is desired. Simply setting 'enforceUniqueIdentity' to 'false' does not wholly resolve the problem.

I'd be happy to take a look at this one! But I heard in standup that Marty has extra bandwidth and he also was the person who implemented the 'Update data' functionality (IRRC) so he would also be a good candidate.