Bug 41111 - AutoILLBackendPriority should consider a 'yellow' stage
Summary: AutoILLBackendPriority should consider a 'yellow' stage
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Pedro Amorim
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-27 15:41 UTC by Pedro Amorim
Modified: 2025-10-28 15:41 UTC (History)
3 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Crowdfunding goal: 0
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41111: Add an yellow state to ILLAutoBackendPriority (5.16 KB, patch)
2025-10-27 15:45 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41111: Add an yellow state to ILLAutoBackendPriority (5.78 KB, patch)
2025-10-28 15:38 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41111: Add an yellow state to ILLAutoBackendPriority (5.80 KB, patch)
2025-10-28 15:40 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2025-10-27 15:41:47 UTC
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.
Comment 1 Pedro Amorim 2025-10-27 15:45:19 UTC Comment hidden (obsolete)
Comment 2 Pedro Amorim 2025-10-28 15:38:31 UTC Comment hidden (obsolete)
Comment 3 Pedro Amorim 2025-10-28 15:40:36 UTC
Created attachment 188521 [details] [review]
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.