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.
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
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'
Created attachment 189621 [details] [review] Bug 41249: Auto backend batch modal column
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.