Skip to content

Surface more data from the request incl. citation ILLDEV-449 ILLDEV-481 - #35

Merged
skomorokh merged 2 commits into
mainfrom
display-more-illdev-449
Aug 19, 2026
Merged

Surface more data from the request incl. citation ILLDEV-449 ILLDEV-481#35
skomorokh merged 2 commits into
mainfrom
display-more-illdev-449

Conversation

@skomorokh

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI lite review requested due to automatic review settings August 18, 2026 23:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  • patronId is interpolated into a URL template without encoding. Since the configured template can include query parameters (e.g. ...query={patronid}), special characters in patronId can 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

  • patronId is interpolated into the configured patronURL template without encoding. If the template uses query parameters, special characters in patronId can break the generated link; substitute with encodeURIComponent(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.

Comment thread ui-rs/src/components/ViewPatronRequest/sections/RequestingUserInfo.js Outdated
Comment thread ui-rs/src/components/Flow/FlowViewComponents/RequestingUser.js
Also remove comment that might become stale with broker changes
@skomorokh
skomorokh merged commit 485b809 into main Aug 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants