Skip to content

Commit

Permalink
UIIN-3207: Sort holdings by location name and call number
Browse files Browse the repository at this point in the history
The instance view shows the holdings that belong to that instance. There are many libraries with many holdings per instance, they need this sorted by effectiveLocation.name, callNumberPrefix, callNumber, callNumberSuffix.

Solution:

Use this CQL query:

`instanceId==5b966ed6-3cd6-4dda-a0c7-f9b5e2826ccd sortBy effectiveLocation.name callNumberPrefix callNumber callNumberSuffix`
  • Loading branch information
julianladisch committed Jan 22, 2025
1 parent cfec02a commit d88fcc3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* Add "linked-data 1.0" interface to "optionalOkapiInterfaces". Refs UIIN-3166.
* Remove hover-over text next to "Effective call number" on the Item record detail view. Refs UIIN-3131.
* Change import of `exportToCsv` from `stripes-util` to `stripes-components`. Refs UIIN-3025.
* Sort holdings by location name and call number. Refs UIIN-3207.

## [12.0.10](https://github.com/folio-org/ui-inventory/tree/v12.0.10) (2025-01-20)
[Full Changelog](https://github.com/folio-org/ui-inventory/compare/v12.0.9...v12.0.10)
Expand Down
2 changes: 1 addition & 1 deletion src/ViewInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class ViewInstance extends React.Component {
fetch: true,
throwErrors: false,
params: {
query: 'instanceId==:{id}',
query: 'instanceId==:{id} sortBy effectiveLocation.name callNumberPrefix callNumber callNumberSuffix',
limit: '1000',
},
tenant: '!{tenantId}',
Expand Down
2 changes: 1 addition & 1 deletion src/providers/HoldingsProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const useInstanceHoldingsQuery = (instanceId, options = {}) => {

const searchParams = {
limit: LIMIT,
query: `instanceId==${instanceId}`,
query: `instanceId==${instanceId} sortBy effectiveLocation.name callNumberPrefix callNumber callNumberSuffix`,
};

const [namespace] = useNamespace({ key: 'fetch-holding-by-instance-id' });
Expand Down
2 changes: 1 addition & 1 deletion src/routes/ViewRequestsRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ViewRequestsRoute.manifest = {
fetch: true,
throwErrors: false,
params: {
query: 'instanceId==:{id}',
query: 'instanceId==:{id} sortBy effectiveLocation.name callNumberPrefix callNumber callNumberSuffix',
limit: '1000',
},
},
Expand Down

0 comments on commit d88fcc3

Please sign in to comment.