Sorting and filtering by dates

UXPROD-4746: Sort, filter, and mapping changes for DatesIn Review

Contents

Overview

In the Ramsons release, new functionality was added to be able to both filter and sort on dates in the Inventory app. This feature focuses on three main areas:

  • New fields in the schema to capture a “Date type” as well as two string input fields - “Date 1” and “Date 2”

  • New sortable column in Inventory results called “Date”

  • New filter in Inventory Search & filter pane called “Date range”

Currently, the labels for each piece of functionality (Date 1, Date 2, Date, and Date range) are meant to be inclusive of all date types, reflecting that the given date may not represent a publication date.

datewolfcondemo.gif

 

Schema changes

Three new fields have been added to the Instance schema: Date type, Date 1, and Date 2. It is important to note that they do not replace any of the existing date-related fields. The new fields can be found at the bottom of the existing Descriptive data accordion.

MARC-Instance mapping

For Instances with source = MARC, the new fields in the schema are mapped as follows:

  • Date type = Description of corresponding code in 008/06

  • Date 1 = 008/07-10

  • Date 2 = 008/11-14

DateMARCmapping.PNG

FOLIO Instances

For Instances with source = FOLIO, the there are the two input fields, Date 1 and Date 2, and the Date type is a dropdown of a controlled list of the supported date types. The text in the two date fields must be four characters, with both numeric and alpha characters supported.

Sorting

New column

In the Inventory Search results list, a new column called “Date” has been added following the “Publishers” column.

This column contains the contents of the Date 1 and Date 2 fields. Depending on the Date type, the two dates are delimited by either a comma to signify two related dates or a hyphen to signify a range.

Sort indicator

The “Date” column is sortable, both ascending and descending.

 

Sort calculation

Sorting is primarily calculated by Date 1. If dates contain alpha characters, for the purpose of sorting, those characters are considered zero. This means that in an ascending sort, these dates will be at the top of the list. See this Jira for further information: MSEARCH-806: Create computed fields for sorting & filtering Date 1Closed

Filtering

In the Search & filter pane, a new filter has been added called “Date range”, which is inclusive of dates provided (i.e., a range from 1901-1903 will include dates 1901, 1902, 1903). This supports three different scenarios:

  • Range between two years

  • Any date after (date entered only in “From” input box)

  • Any date before (date entered only in “To” input box)

Like sorting, this filter is dependent on the value in Date 1.