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 agreements with different statuses
- Do a search which displays agreements with a variety of statuses
- Click "Status" column header in the results MCL
- Note that the status does not sort alphabetically by displayed value in the results MCL
Expected Results:
Should sort alphabetically ASC by status label
Actual Results:
Sorts ASC by status id (I believe)
Additional Information:
Currently the sort applied is `sort=agreementStatus%3Basc`
I think the correct sort is `sort=agreementStatus.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-agreements/blob/master/src/components/views/Agreements.js#L269https://github.com/folio-org/ui-agreements/blob/master/src/components/views/Agreements.js#L276https://github.com/folio-org/ui-agreements/blob/master/src/components/views/Agreements.js#L298https://github.com/folio-org/ui-agreements/blob/master/src/components/views/Agreements.js#L329
--
From "agreementStatus" to "agreementStatus.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 AgreementStatus
See comments section below for new recommendation: