Bug 41249 - ILL batches should be compatible with AutoILLBackendPriority
Summary: ILL batches should be compatible with AutoILLBackendPriority
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: 41247
Blocks:
  Show dependency treegraph
 
Reported: 2025-11-13 15:48 UTC by Pedro Amorim
Modified: 2025-11-14 16:33 UTC (History)
6 users (show)

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


Attachments
Bug 41249: Preparation Move confirmauto logic to earlier in controller (3.65 KB, patch)
2025-11-14 16:32 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41249: Update toolbar batches button logic (2.95 KB, patch)
2025-11-14 16:33 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41249: Auto backend batch modal column (12.10 KB, patch)
2025-11-14 16:33 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41249: Add cypress tests (37.17 KB, patch)
2025-11-14 16:33 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-11-13 15:48:47 UTC
AutoILLBackendPriority suggests the top most available backend in priority when creating a new ILL request. This should also work the same when creating requests through the ILL batches functionality.
Comment 1 Pedro Amorim 2025-11-14 16:32:58 UTC
Created attachment 189619 [details] [review]
Bug 41249: Preparation Move confirmauto logic to earlier in controller

This is in order to be able to have a have_batch_auto_backends_json which contains all backends that are compatible with both:
A) AutoILLBackendPriority sys pref and
B) ILL batches
Comment 2 Pedro Amorim 2025-11-14 16:33:02 UTC
Created attachment 189620 [details] [review]
Bug 41249: Update toolbar batches button logic

Same behaviour as regular 'new ILL request' button, i.e. if AutoILLBackendPriorty sys pref is being used, do not present the backend options upon clicking 'new batch'
Comment 3 Pedro Amorim 2025-11-14 16:33:05 UTC
Created attachment 189621 [details] [review]
Bug 41249: Auto backend batch modal column
Comment 4 Pedro Amorim 2025-11-14 16:33:08 UTC
Created attachment 189622 [details] [review]
Bug 41249: Add cypress tests

cypress run --spec t/cypress/integration/ILL/Batches_spec.ts

Test plan:
1) Enable ILLModule
2) Install a backend compatible with ILL batches + AutoILLBackendPriority sys pref:
https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.8
3) Install a metadata enrichment plugin (required for ILL batches):
https://github.com/openfifth/koha-plugin-api-pubmed/releases/tag/1.1.1
4) Enable AutoILLBackendPriority sys pref by checking 'PluginBackend'
5) Visit the ILL module:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl
6) Notice the 'New ILL requests batch' shows. Click that.
7) Enter any name, '42' for cardnumber and any library. Click 'Continue'.
8) On t'he textarea that shows enter the following pubmed IDs (separated by new line)
    123
    321
    456
9) Notice that PluginBackend will sometimes be red, sometimes be yellow and sometimes be green. This is a test backend and that will happen randomly. Repeat step 8) for more test result samples.
10) Notice that, when green, PluginBackend will be pre-selected. When yellow, it'll allow you to select it but not pre-select it and when red doesnt allow it to be selected at all.
11) Play around with the selection of backends and click 'Add items to batch' and verify that each request was created in the respective selected backend.