Support sorting course reserves by "indexTitle"

Description

Overview

The instance's indexTitle field is described in the schema as: "Title normalized for browsing and searching; based on the title with articles removed". In some cases it's preferable to sort on this field as opposed to title. When sorting by title you often get all of the instances which start with "A " at the top of your results... so "A Semantic Web Primer" and "A Wrinkle in Time" would both come before "Breakfast of Champions" because of the leading "A ".

By including indexTitle in the course reserve schema under "copiedItem", it would allow for sorting on either title or indexTitle.

Examples:

GET /coursereserves/courselistings/c03bcba3-a6a0-4251-b316-0631bb2e6f21/reserves?limit=100&query=%28cql.allRec
ords%3D1%29%20sortby%20copiedItem.indexTitle

GET /coursereserves/reserves?limit=100&query=%28cql.allRec
ords%3D1%29%20sortby%20copiedItem.indexTitle

GET /coursereserves/courselistings/c03bcba3-a6a0-4251-b316-0631bb2e6f21/reserves?limit=100&query=%28cql.allRec
ords%3D1%29%20sortby%20copiedItem.title

GET /coursereserves/reserves?limit=100&query=%28cql.allRec
ords%3D1%29%20sortby%20copiedItem.title

Approach

  1. Add the indexTitle field to the reserves.json schema

  2. Write migration/upgrade scripts to populate this field in the _tenant API handler by making calls to mod-inventory-storage.

Acceptance Criteria

  • Course reserves can be sorted by copiedItem.indexTitle

  • Upgrade scripts populate the copiedItem.indexTitle for all existing course reserves

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Details

Assignee

Reporter

Priority

Development Team

None

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created February 14, 2023 at 10:36 PM
Updated February 28, 2023 at 6:18 PM
TestRail: Cases
TestRail: Runs

Flag notifications