[Bug 41111] New: AutoILLBackendPriority should consider a 'yellow' stage
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Bug ID: 41111 Summary: AutoILLBackendPriority should consider a 'yellow' stage Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: ILL Assignee: koha-bugs@lists.koha-community.org Reporter: pedro.amorim@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com, pedro.amorim@openfifth.co.uk, tomascohen@gmail.com Previously only 'red' and 'green' existed, for can't place/unavailable and can place/its available. 'Yellow' now means the backend can place - but can't confirm that it'll be supplied or it requires additional confirmation to place it. Functionality this should work in the following manner: 1) 'Yellow' backends are only suggested by Koha in the Staff UI if no other 'green' backends exist 2) Koha still suggests the first 'green' backend even if a 'yellow' one is higher in priority 3) OPAC ignores this completely. Only 'green' backends are still picked as the goto backend. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 --- Comment #1 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- Created attachment 188478 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188478&action=edit Bug 41111: Add an yellow state to ILLAutoBackendPriority Originally, AutoILLBackendPriority only considered 2 states: green or red. This patch introduces a yellow state. Yellow means the Staff UI can pick that backend, but Koha will only suggest that as the goto backend if no other 'green' backends exist. If both green and yellow backends are returned, Koha will suggest the top green in priority. OPAC will never consider 'yellow' backends. Functionality there stays the same: Pick first 'green' backend in priority or default to Standard. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |pedro.amorim@openfifth.co.u |ity.org |k -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #188478|0 |1 is obsolete| | --- Comment #2 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- Created attachment 188520 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188520&action=edit Bug 41111: Add an yellow state to ILLAutoBackendPriority Originally, AutoILLBackendPriority only considered 2 states: green or red. This patch introduces a yellow state. Yellow means the Staff UI can pick that backend, but Koha will only suggest that as the goto backend if no other 'green' backends exist. If both green and yellow backends are returned, Koha will suggest the top green in priority. OPAC will never consider 'yellow' backends. Functionality there stays the same: Pick first 'green' backend in priority or default to Standard. Test plan: 1) Enable ILLModule 2) Install this dummy backend plugin designed for testing purposes only: https://github.com/openfifth/koha-ill-backend-plugin 3) Enable AutoILLBackendPriority by ticking "PluginBackend" 4) Create a new ILL request, visit: <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 5) If you put 'red' as title, the backend will return unavailable. If you put 'green' on title the backend will return available. If you put 'yellow' on the backend it'll return the new 'yellow' stage. If title doesnt match that it'll return one of the 3 at random. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #188520|0 |1 is obsolete| | --- Comment #3 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- Created attachment 188521 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188521&action=edit Bug 41111: Add an yellow state to ILLAutoBackendPriority Originally, AutoILLBackendPriority only considered 2 states: green or red. This patch introduces a yellow state. Yellow means the Staff UI can pick that backend, but Koha will only suggest that as the goto backend if no other 'green' backends exist. If both green and yellow backends are returned, Koha will suggest the top green in priority. OPAC will never consider 'yellow' backends. Functionality there stays the same: Pick first 'green' backend in priority or default to Standard. Test plan: 1) Enable ILLModule 2) Install this dummy backend plugin designed for testing purposes only: https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.7 3) Enable AutoILLBackendPriority by ticking "PluginBackend" 4) Create a new ILL request, visit: <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 5) If you put 'red' as title, the backend will return unavailable. If you put 'green' on title the backend will return available. If you put 'yellow' on the backend it'll return the new 'yellow' stage. If title doesnt match that it'll return one of the 3 at random. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #188521|0 |1 is obsolete| | --- Comment #4 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- Created attachment 190839 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190839&action=edit Bug 41111: Add an yellow state to ILLAutoBackendPriority Originally, AutoILLBackendPriority only considered 2 states: green or red. This patch introduces a yellow state. Yellow means the Staff UI can pick that backend, but Koha will only suggest that as the goto backend if no other 'green' backends exist. If both green and yellow backends are returned, Koha will suggest the top green in priority. OPAC will never consider 'yellow' backends. Functionality there stays the same: Pick first 'green' backend in priority or default to Standard. Test plan: 1) Enable ILLModule 2) Install this dummy backend plugin designed for testing purposes only: https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.7 3) Enable AutoILLBackendPriority by ticking "PluginBackend" 4) Create a new ILL request, visit: <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 5) If you put 'red' as title, the backend will return unavailable. If you put 'green' on title the backend will return available. If you put 'yellow' on the backend it'll return the new 'yellow' stage. If title doesnt match that it'll return one of the 3 at random. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190839|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 190867 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190867&action=edit Bug 41111: Add an yellow state to ILLAutoBackendPriority Originally, AutoILLBackendPriority only considered 2 states: green or red. This patch introduces a yellow state. Yellow means the Staff UI can pick that backend, but Koha will only suggest that as the goto backend if no other 'green' backends exist. If both green and yellow backends are returned, Koha will suggest the top green in priority. OPAC will never consider 'yellow' backends. Functionality there stays the same: Pick first 'green' backend in priority or default to Standard. Test plan: 1) Enable ILLModule 2) Install this dummy backend plugin designed for testing purposes only: https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.7 3) Enable AutoILLBackendPriority by ticking "PluginBackend" 4) Create a new ILL request, visit: <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 5) If you put 'red' as title, the backend will return unavailable. If you put 'green' on title the backend will return available. If you put 'yellow' on the backend it'll return the new 'yellow' stage. If title doesnt match that it'll return one of the 3 at random. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #6 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. If you put 'yellow' in the title for a request, on the confirm request page youget two options, 1.1 has a yellow background, 1.2 has a standard light-grey background: 1.1 PluginBackend Warning. Can be placed but will go through manual verification 1.2 Standard -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Aude Charillon <aude.charillon@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aude.charillon@openfifth.co | |.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |lisette@bywatersolutions.co |y.org |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de Status|Signed Off |Failed QA --- Comment #7 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Hi Pedro, this works, but I found some issues while exercising the test plan. The following was written by Claude Opus 5.5: 1. The yellow backend is never suggested. The commit message says it becomes the suggested backend when no green ones exist, but with only a yellow result the recommendation is "Standard". _addWarningMessage sets available = 0, and the pick only matches available. Either fall back to the first yellow backend on the staff side, or reword the commit message. 2. Standard is no longer highlighted when selected. The change handler only highlights rows containing .text-success or .text-warning, and the Standard row has neither. It needs an else branch with the previous green styling. Minor: a 2xx response with neither success nor warning leaves "Verifying availability..." spinning forever, so please add a fallback branch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 --- Comment #8 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Could reproduce both of those, btw. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190867|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|lisette@bywatersolutions.co |paul.derscheid@lmscloud.de |m | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 --- Comment #9 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 209583 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209583&action=edit Bug 41111: Add a yellow state to AutoILLBackendPriority Originally, AutoILLBackendPriority only considered 2 states: green or red. This patch introduces a yellow state. Yellow means the Staff UI can pick that backend, but Koha will never pre-select a yellow backend. Test plan: 1) Enable ILLModule 2) Install this dummy backend plugin designed for testing purposes only: https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.7 3) Enable AutoILLBackendPriority by ticking "PluginBackend" 4) Create a new ILL request, visit: <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 5) If you put 'red' as title, the backend will return unavailable. If you put 'green' on title the backend will return available. If you put 'yellow' on the title, the backend will return the new 'yellow' stage. If title doesnt match that it'll return one of the 3 at random. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 --- Comment #10 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 209584 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209584&action=edit Bug 41111: (QA follow-up) Highlight the Standard backend when selected Selecting Standard no longer highlighted it. Yellow rows are now highlighted in yellow and any other row in green, as before. Test plan: 1) Follow the test plan from the first patch 2) Select 'Standard': highlighted in green 3) Use 'yellow' as the title, select PluginBackend: highlighted in yellow Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 --- Comment #11 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 209585 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209585&action=edit Bug 41111: (QA follow-up) Show an error when a backend returns neither success nor warning Such a response left 'Verifying availability...' spinning forever. It is now shown as an error, in the staff interface and the OPAC. Test plan: 1) Follow the test plan from the first patch 2) In the KTD shell, make the dummy backend return neither: sed -i "s/success => ''/foo => ''/" /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/PTFSEurope/PluginBackend/Api.pm restart_all 3) Use 'green' as the title: 'Not readily available: Error' 4) Revert the change from 2 and restart_all Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 --- Comment #12 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- (In reply to Paul Derscheid from comment #7)
Hi Pedro, this works, but I found some issues while exercising the test plan.
The following was written by Claude Opus 5.5:
1. The yellow backend is never suggested. The commit message says it becomes the suggested backend when no green ones exist, but with only a yellow result the recommendation is "Standard". _addWarningMessage sets available = 0, and the pick only matches available. Either fall back to the first yellow backend on the staff side, or reword the commit message. 2. Standard is no longer highlighted when selected. The change handler only highlights rows containing .text-success or .text-warning, and the Standard row has neither. It needs an else branch with the previous green styling.
Minor: a 2xx response with neither success nor warning leaves "Verifying availability..." spinning forever, so please add a fallback branch.
Thanks Paul, 1. I've reworded the commit message. I believe that behavior was intended initially but then dropped, and the commit message never updated. 2. and the minor nit should be fixed. Thanks again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #209583|0 |1 is obsolete| | Attachment #209584|0 |1 is obsolete| | Attachment #209585|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 --- Comment #13 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 209633 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209633&action=edit Bug 41111: Add a yellow state to AutoILLBackendPriority Originally, AutoILLBackendPriority only considered 2 states: green or red. This patch introduces a yellow state. Yellow means the Staff UI can pick that backend, but Koha will never pre-select a yellow backend. Test plan: 1) Enable ILLModule 2) Install this dummy backend plugin designed for testing purposes only: https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.7 3) Enable AutoILLBackendPriority by ticking "PluginBackend" 4) Create a new ILL request, visit: <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 5) If you put 'red' as title, the backend will return unavailable. If you put 'green' on title the backend will return available. If you put 'yellow' on the title, the backend will return the new 'yellow' stage. If title doesnt match that it'll return one of the 3 at random. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 --- Comment #14 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 209634 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209634&action=edit Bug 41111: (QA follow-up) Highlight the Standard backend when selected Selecting Standard no longer highlighted it. Yellow rows are now highlighted in yellow and any other row in green, as before. Test plan: 1) Follow the test plan from the first patch 2) Select 'Standard': highlighted in green 3) Use 'yellow' as the title, select PluginBackend: highlighted in yellow Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 --- Comment #15 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 209635 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209635&action=edit Bug 41111: (QA follow-up) Show an error when a backend returns neither success nor warning Such a response left 'Verifying availability...' spinning forever. It is now shown as an error, in the staff interface and the OPAC. Test plan: 1) Follow the test plan from the first patch 2) In the KTD shell, make the dummy backend return neither: sed -i "s/success => ''/foo => ''/" /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/PTFSEurope/PluginBackend/Api.pm restart_all 3) Use 'green' as the title: 'Not readily available: Error' 4) Revert the change from 2 and restart_all Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Aude Charillon <aude.charillon@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | Text to go in the| |When the release notes| |AutoILLBackendPriority | |system preference is | |enabled, the availability | |check page uses a colour | |code to highlight backends: | |green for "can place the | |ILL request / available", | |red for "can't place the | |ILL request / unavailable". | |There is now another | |colour: yellow for "can | |place the ILL request but | |will go through manual | |verification". | | | |- Koha will always | |recommend a green backend | |over a yellow one, even if | |the yellow backend has a | |higher priority in | |AutoILLBackendPriority. | |- The yellow backend is | |never automatically | |selected as the recommended | |one, but staff can choose | |to select it. --- Comment #16 from Aude Charillon <aude.charillon@openfifth.co.uk> --- I hope I have understood the latest comments; please correct the release notes if I confused things! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 --- Comment #17 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41111 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting --- Comment #18 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Enhancement, no 26.05.x backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org