At the moment, we're concating status and status_alias in the ILL left filters. We also have our own custom logic of what to present in the status table column, i.e. if a status_alias exists, we show that over status. This may cause confusing as some users are filtering for status, but table is showing status_alias. We need to find a way to make it obvious which status a request is at, and which status_alias (if any) is at.
Created attachment 154034 [details] [review] Bug 34431: Add 'type' to existing_statuses method
Created attachment 154035 [details] [review] Bug 34431: Distinguish status from status_alias in filter dropdown Add a new optgroup in status dropdown
Created attachment 154036 [details] [review] Bug 34431: Distinguish status from status_alias in table column status now always displays. status_alias shows after in italic bold if exists
Created attachment 154037 [details] [review] Bug 34431: Update tests
The following command will (hopefully) reset your ILL data and create 10k fake ILL requests (run this in DEV KTD only). 1) BEFORE APPLYING PATCH, on an empty k-t-d, run: bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev-data.sh) 2) Pet a cat 3) Visit /cgi-bin/koha/admin/authorised_values.pl add search for "alias", click on ILL_STATUS_ALIAS 4) Click on the "New authorized value for ILL_STATUS_ALIAS" button and add "alias_code" in authorized value and "Alias Description" in Description 5) Visit /cgi-bin/koha/ill/ill-requests.pl and click "Manage request" on a FreeForm request, click "Edit request" 6) Edit the Status and select "Alias Description", click "Submit" 7) Visit /cgi-bin/koha/ill/ill-requests.pl and select FreeForm on the "Backend:" left-side filter 8) Notice how "Status Description" status_alias is now there, mixed with all the other "real" statuses. Click on it and filter on it. Confirm it works 9) Notice the table displays "Status Description" on the "Status" table column 10) Apply patch 11) Repeat 7) Notice how "Status Description" now shows under a new optgroup "Status aliases" 12) Notice the table nows displays whatever status the request has, followed by the "Status Description" status_alias in italic bold
I'm going to implement this differently.
Created attachment 154289 [details] [review] Bug 34431: Allow for x-koha-embed in ill/backends endpoint
Created attachment 154290 [details] [review] Bug 34431: Show both status and status_alias - if exists - in table column
Created attachment 154291 [details] [review] Bug 34431: Add a status_alias filter input, if any status_alias exist This patch also makes it so that the status input filter is enabled by default, and shows all existing statuses by default, or all existing statuses for a specific backend, if and when selected.
Created attachment 154292 [details] [review] Bug 34431: Update tests
Created attachment 154301 [details] [review] Bug 34431: Add status and status_alias filters to clear
Created attachment 154405 [details] [review] Bug 34431: Add 'type' to existing_statuses method Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Created attachment 154406 [details] [review] Bug 34431: Allow for x-koha-embed in ill/backends endpoint Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Created attachment 154407 [details] [review] Bug 34431: Show both status and status_alias - if exists - in table column Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Created attachment 154408 [details] [review] Bug 34431: Add a status_alias filter input, if any status_alias exist This patch also makes it so that the status input filter is enabled by default, and shows all existing statuses by default, or all existing statuses for a specific backend, if and when selected. Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Created attachment 154409 [details] [review] Bug 34431: Update tests Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Created attachment 154410 [details] [review] Bug 34431: Add status and status_alias filters to clear Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Created attachment 154999 [details] [review] Bug 34431: (QA follow-up) Fix duplicate backend options Prevent adding backend option if the option already exists
*** Bug 33685 has been marked as a duplicate of this bug. ***