STORY: Lookups | Adding Code
Description
Environment
Potential Workaround
Attachments
- 05 Jul 2024, 10:10 AM
- 05 Jul 2024, 10:10 AM
- 05 Jul 2024, 10:10 AM
- 05 Jul 2024, 10:10 AM
- 05 Jul 2024, 10:10 AM
- 05 Jul 2024, 10:10 AM
- 05 Jul 2024, 10:10 AM
- 05 Jul 2024, 10:10 AM
- 05 Jul 2024, 10:10 AM
- 05 Jul 2024, 10:10 AM
- 02 Jul 2024, 04:31 PM
- 02 Jul 2024, 04:31 PM
clones
relates to
Checklist
hideActivity
Tetiana KovalchukJuly 5, 2024 at 10:36 AM
Tested on qld env
Build version: #304
Test cases and evidences attached.
Some issues related to lookups but not to the scope of current story are created as defects and linked.
Tetiana KovalchukJuly 5, 2024 at 10:09 AM
Verified scenario with contentType mentioned by @Punnoose Kutty Jacob Pullolickal below.
Work1 -7100824613169816150 created through Linked Data Editor contains content -1049847018111136996.
Work2 7497293532765928992 created though Inventory contains the same content -1049847018111136996.
Tetiana KovalchukJuly 3, 2024 at 7:23 AMEdited
@Punnoose Kutty Jacob Pullolickal this particular story says about adding codes for lookups on front-end. It doesn’t include any scenarios with rules for sending code to BE.
To me described scenario doesn’t look related and should be covered separately.
Siarhei KarolJuly 3, 2024 at 7:01 AM
@Punnoose Kutty Jacob Pullolickal I'll fix it as part of this ticket
Punnoose Kutty Jacob PullolickalJuly 2, 2024 at 4:31 PMEdited
Hi @Doug Loynes @Siarhei Karol @Tetiana Kovalchuk
I realized that we overlooked one scenario when working on this ticket.
Let us take two Works, whose content type is ‘text’
Work #1: Created through linked data editor
Work #2: Created through MARC import (quick marc)
After this change, the structure of the graph will be as follows.
This graph is incorrect as we have two category resources for content type “text”.
The correct graph should be as follows
In order to create the correct graph, UI should not send the code to backend when making PUT & POST API request. The code should be used only for display purpose. Should we create a separate ticket for that? Or can we fix it as part of this ticket?
Description
Card originally written to update drop down for the Place of Origin component, so that corresponding codes are displayed in the drop down, and allow the cataloger to input a code for selecting a value.
A number of other components have similar requirements, so this card is being repurposed to apply a general rule for any such drop down.
COMPONENT
Work or Instance
JSON link
Carrier type
I
https://id.loc.gov/vocabulary/carriers.json
Color content
W
https://id.loc.gov/vocabulary/mcolor.json
Country (Place of origin of work)
W
https://id.loc.gov/vocabulary/countries.json
Illustrative content
W
https://id.loc.gov/vocabulary/millus.json
Language
W
https://id.loc.gov/vocabulary/languages.json
Media type
I
https://id.loc.gov/vocabulary/mediaTypes.json
Mode of issuance
I
https://id.loc.gov/vocabulary/issuance.json
Notes about the Instance
I
https://id.loc.gov/vocabulary/mnotetype.json
Relationship Designator (Creator & Contributor)
W / I
https://id.loc.gov/vocabulary/relators.json
Script
I
https://id.loc.gov/vocabulary/mscript.json
Supplementary content
I
https://id.loc.gov/vocabulary/msupplcont.json
Identifier - ISBN
I
https://id.loc.gov/vocabulary/mstatus/cancinv.json
Identifier - LCCN
I
https://id.loc.gov/vocabulary/mstatus/cancinv.json
Search place of publication (to/from 008)
I
https://id.loc.gov/vocabulary/countries.json
Thesaurus (if not LCGFT)
W
https://id.loc.gov/vocabulary/genreFormSchemes.json
Government publication
W
https://id.loc.gov/vocabulary/mgovtpubtype.json
Intended audience
W
https://id.loc.gov/vocabulary/maudience.json
Content type
W
https://id.loc.gov/vocabulary/contentTypes.json
INSTANCE
Immediate source of acquisition
Purpose:
The purpose of this story is to enhance the Place of Origin of the Work functionality, to provide an additional option for catalogers to complete their work.
Currently, the component displays a drop down list of countries based on a controlled list maintained by the Library of Congress: https://id.loc.gov/vocabulary/countries.html
Catalogers can either type in the name of the country, or select the value from the drop down.
This card adds a third option: selecting a value by typing the code associated with the country. MARVA supports this functionality today. The country code is appended in parenthesis alongside the country name. Doing so preserves displaying countries alphabetically by country name, while allowing the end user to type the country code as another way to select a value from the list.
A JSON file (conveniently) associates country codes with display names: https://id.loc.gov/vocabulary/countries.json
To update and construct a new drop down table for the editor, the code will need to be extracted from the end of each value pointing to id.loc.gov, and appended within parenthesis to the corresponding country name.
Once constructed, the end user will have the ability to type any either a country name, or a country code and the drop down list will narrow accordingly.