Details
-
Bug
-
Status: Closed (View Workflow)
-
TBD
-
Resolution: Done
-
-
ERM Sprint 115, ERM Sprint 116, ERM Sprint 117
-
Bienenvolk
Description
Overview:
Steps to Reproduce:
- Create at least two licenses with different types
- Do a search which displays licenses with a variety of types
- Click "Type" column header in the results MCL
- Note that the type does not sort alphabetically by displayed value in the results MCL
Expected Results:
Should sort alphabetically ASC by type label
Actual Results:
Sorts ASC by type id (I believe)
Additional Information:
Currently the sort applied is `sort=type%3Basc`
I think the correct sort is `sort=type.label%3Basc`
URL:
Interested parties:
Dev task breakdown
It appears that there is no neat way to map between column name and sort term in SASQ, rather that it directly grabs from the column name. We can intefere with the `onSort` function and insert `.label` where applicable, or take the slightly easier route of renaming the column.
--
Changing lines:
--
https://github.com/folio-org/ui-licenses/blob/master/src/components/Licenses/Licenses.js#L250https://github.com/folio-org/ui-licenses/blob/master/src/components/Licenses/Licenses.js#L258https://github.com/folio-org/ui-licenses/blob/master/src/components/Licenses/Licenses.js#L288https://github.com/folio-org/ui-licenses/blob/master/src/components/Licenses/Licenses.js#L323
From "type" to "type.label" should do the trick.
NOTE: We don't want to change the internationalised column header, or any of the formatters, just the keys for Type