[UIIN-321] Instances with non-existing language codes crashes the instance view Created: 21/Jun/18  Updated: 16/Jun/21  Resolved: 19/May/20

Status: Closed
Project: ui-inventory
Components: None
Affects versions: None
Fix versions: None

Type: Bug Priority: P4
Reporter: Theodor Tolstoy (One-Group.se) Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: back-end, bug-instance, triaged, ui-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: PNG File image-2018-06-21-08-27-31-520.png    
Issue links:
Relates
relates to FOLIO-1299 Add valid language codes as an enum t... Open
Sprint:
Development Team: Prokopovych

 Description   

Overview:

Steps to Reproduce:

  1. Post an Instance to /instance-storage/instances that has a language code that is non-existant, like "mylang"
  2. lookup that record in the ui by going to /inventory/view/ {InstanceId}

Expected Results:
I am not sure. If the correct language code is needed, then the record should not be added in the first place. But given the state of the backend,* perhaps a more graceful error message would be a good start*.

Actual Results:
A UI crash. See attachment.

Additional Information:
This record had been checked towards the JSON schema, before they were posted, but language codes are not part of that. Is there a way to add that so you could do the checks before posting?

Test data:
??{
"instanceTypeId": "d02e6f4b-be20-44eb-b500-daa49eef0c3a",
"physicalDescriptions": ["pd1", "pd2"],
"source": "chalmers_dump",
"id": "8c175ada-0a78-4799-a7e7-fff8d803b90f",
"notes": ["note1", "note2"],
"contributors": [

{ "primary": true, "contributorNameTypeId": "2b94c631-fca9-a892-c730-03ee529ffe2a", "contributorTypeText": "Personal name", "name": "Hordeski, Michael F." }

],
"title": "Troubleshooting and repairing PCs : beyond the basics",
"urls": ["http://dn.se", "https://svd.se"],
"instanceFormatId": "4eba6d19-5fef-4d2f-a6da-9f2176ccf851",
"languages": ["mylang"],
"identifiers": [

{ "value": "0070305560", "identifierTypeId": "913300b2-03ed-469a-8179-c1092c991227" }

,

{ "value": "0-07-030555-2", "identifierTypeId": "8261054f-be78-422d-bd51-4ed9f33c3422" }

],
"publication": [

{ "dateOfPublication": "c", "place": "b", "publisher": "a" }

],
"series": ["Series 1", "Series 2"],
"subjects": ["Subject 1", "Subject 2"],
"alternativeTitles": ["Alternative title1", "Alternative title 2"],
"edition": "Edition"
}??

Interested parties:



 Comments   
Comment by Cate Boerema (Inactive) [ 21/Jun/18 ]

Looks like this is a proposed solution to this bug: FOLIO-1299 Open

Comment by Theodor Tolstoy (One-Group.se) [ 21/Mar/19 ]

Yes it is Cate Boerema

Comment by Charlotte Whitt [ 19/May/20 ]

Hi Theodor Tolstoy (One-Group.se) - this is a bug which is "over 12 month old" - and will be closed by EOB Wednesday 5/20. If we encounter the problem again, I'll revive the bug. Sounds okay?

CC: Anton Emelianov

Comment by Theodor Tolstoy (One-Group.se) [ 19/May/20 ]

Sure, I now know what to do to prevent it from happening, so I am good.

Generated at Thu Feb 08 23:12:17 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.