Surface more data from the request incl. citation ILLDEV-449 ILLDEV-481 - #35
Merged
Conversation
skomorokh
requested review from
adamdickmeiss,
ihardy,
jakub-id and
kurtnordstrom
as code owners
August 18, 2026 23:34
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the Flow and Details views to surface additional ISO 18626 request data (requesting user info, richer citation metadata, costs, and supplier-response fields), and refactors related parsing/formatting logic into reusable utilities.
Changes:
- Add utilities to extract bibliographic identifiers, format ISO 18626 costs, derive the patron email, and determine the currently-agreed cost from condition notifications.
- Update Flow/Details UI sections to display requesting user data, citation metadata, service type/level, maximum cost, agreed cost, due date, and item barcode.
- Remove legacy custom-identifiers and user-card implementations in favor of the new ISO 18626-backed sections.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ui-rs/translations/ui-rs/en.json | Removes an unused translation key and supports updated labels used by new UI fields. |
| ui-rs/src/util/patronEmail.js | Adds helper to select the first Email-typed electronic address from ISO 18626 patronInfo. |
| ui-rs/src/util/patronEmail.test.js | Adds unit tests for patronEmail selection and absence behavior. |
| ui-rs/src/util/formatCosts.js | Adds helper to format ISO 18626 TypeCosts values, preserving zero. |
| ui-rs/src/util/formatCosts.test.js | Adds unit tests to ensure zero cost is retained and empty values are omitted. |
| ui-rs/src/util/formatCondition.js | Adds findAgreedCost for selecting the latest accepted priced condition for a supplier. |
| ui-rs/src/util/formatCondition.test.js | Adds unit tests for agreed-cost selection rules (receipt/supplier/recency/zero). |
| ui-rs/src/util/bibIdentifiers.js | Centralizes identifier array extraction (ISBN/ISSN/OCLC) for reuse. |
| ui-rs/src/util/bibIdentifiers.test.js | Adds unit tests for identifier extraction edge cases and duplication rules. |
| ui-rs/src/test/stripesCore.js | Extends stripes config stub with patronURL template for link tests. |
| ui-rs/src/routes/ViewRoute.test.js | Expands fixture and assertions to cover new details composition content and omission cases. |
| ui-rs/src/routes/FlowRoute.test.js | Expands fixture and assertions to cover new Flow request-info fields and borrower-only user section. |
| ui-rs/src/components/ViewPatronRequest/sections/RequestingUserInfo.js | Replaces legacy UserCard usage with ISO 18626 patronInfo-backed requesting-user section. |
| ui-rs/src/components/ViewPatronRequest/sections/RequestInfo.js | Switches needed-by/date fields to ISO 18626 locations and removes display of legacy requestIdentifiers. |
| ui-rs/src/components/ViewPatronRequest/sections/index.js | Adds RequestingUserInfo and CitationMetadataInfo sections to the Details view. |
| ui-rs/src/components/ViewPatronRequest/sections/CitationMetadataInfo.js | Refactors citation metadata section to use ISO 18626 nested fields and coded identifier arrays. |
| ui-rs/src/components/PatronRequestForm/formMapping.js | Reuses shared bibIdentifiers extraction logic instead of duplicating parsing. |
| ui-rs/src/components/Flow/FlowViewComponents/RequestingUser.js | Updates Flow requesting-user section to use ISO 18626 patronInfo and new query/link behavior. |
| ui-rs/src/components/Flow/FlowViewComponents/RequestInfo.js | Displays additional ISO 18626 request fields (service type/level, costs, due date, item barcode) and agreed cost from notifications. |
| ui-rs/src/components/Flow/FlowViewComponents/index.js | Adds RequestingUser and Citation sections into Flow composition order. |
| ui-rs/src/components/Flow/FlowViewComponents/Citation.js | Updates copy-citation section to source from ISO 18626 nested service/publication/bibliographic info. |
| ui-rs/src/components/ViewPatronRequest/sections/CustomIdentifiersInfo.js | Removes legacy custom-identifiers section. |
| ui-rs/src/components/ViewPatronRequest/sections/CustomIdentifiers.css | Removes unused styling for deleted custom-identifiers section. |
| ui-rs/src/components/cards/user/UserCard.js | Removes legacy user card component now superseded by the new requesting-user sections. |
Suppressed comments (2)
ui-rs/src/components/ViewPatronRequest/sections/RequestingUserInfo.js:31
patronIdis interpolated into a URL template without encoding. Since the configured template can include query parameters (e.g....query={patronid}), special characters inpatronIdcan break the link or change the query; encode the placeholder substitution.
const patronURLTemplate = stripes?.config?.reshare?.patronURL;
const patronLink = patronId && patronURLTemplate
? <Link to={patronURLTemplate.replace('{patronid}', patronId)}>{patronId}</Link>
: patronId;
ui-rs/src/components/Flow/FlowViewComponents/RequestingUser.js:26
patronIdis interpolated into the configuredpatronURLtemplate without encoding. If the template uses query parameters, special characters inpatronIdcan break the generated link; substitute withencodeURIComponent(patronId)instead.
const patronURLTemplate = stripes?.config?.reshare?.patronURL;
if (!patronURLTemplate) return null;
const patronURL = patronId ? patronURLTemplate.replace('{patronid}', patronId) : null;
const listPath = upNLevels(location, 2).split('?')[0];
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Also remove comment that might become stale with broker changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.