Description
Pedro Amorim
2025-05-29 12:39:13 UTC
Created attachment 182836 [details] [review] Bug 40026: Edit item metadata should present Standard form if AutoILLBackendPriority is in use When the AutoILLBackendPriority system preference is enabled, the form that was used is always the Standard form, regardless of which backend the request ends up on. It only makes sense that when editing an ILL request's item metadata, the form shown is also the Standard form if AutoILLBackendPriority is in use. Test plan, k-t-d, don't apply patch: 1) Enable ILLModule 2) Install an external backend, e.g. the libkey lending tool (IncDocs) backend plugin: https://github.com/openfifth/koha-ill-libkey-lending-tool/releases/tag/v2.0.3 3) Restart plack $ koha-plack --restart kohadev 4) Create a new IncDocs ILL request: <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=IncDocs 5) Add a DOI '123', a cardnumber '42' and any library. Click 'Make request'. 6) Enable AutoILLBackendPriority system preference by ticking 'IncDocs'. This is only done now to simplify the test plan, as creating an 'IncDocs' request using AutoILLBackendPriority requires credentials configuration. 7) Back on the 'Manage request' page for the request created in step 5, click 'Edit item metadata'. Notice the form shown is the 'Standard' form. Edit any of the metadata values, click 'Save'. Verify the new metadata is saved correctly. Created attachment 182837 [details] [review] Bug 40026: Update edit item metadata screen header Created attachment 182838 [details] [review] Bug 40026: 'Cancel' edit item metadata returns to request, not table view Not sure what to do after step 7 for testing - no patch is applied yet. After that step, I applied the patch and restarted everything. Now when I access the ILL request I created, I get a 500 error - which I assume is because of step 6 that credentials are required. Created attachment 182898 [details] [review] Bug 40026: Edit item metadata should present Standard form if AutoILLBackendPriority is in use When the AutoILLBackendPriority system preference is enabled, the form that was used is always the Standard form, regardless of which backend the request ends up on. It only makes sense that when editing an ILL request's item metadata, the form shown is also the Standard form if AutoILLBackendPriority is in use. Test plan, k-t-d, don't apply patch: 1) Enable ILLModule 2) Install an external backend, e.g. the libkey lending tool (IncDocs) backend plugin: https://github.com/openfifth/koha-ill-libkey-lending-tool/releases/tag/v2.0.3 3) Restart plack $ koha-plack --restart kohadev 4) Create a new IncDocs ILL request: <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=IncDocs 5) Add a DOI '123', a cardnumber '42' and any library. Click 'Make request'. 6) Enable AutoILLBackendPriority system preference by ticking 'IncDocs'. This is only done now to simplify the test plan, as creating an 'IncDocs' request using AutoILLBackendPriority requires credentials configuration. 7) Back on the 'Manage request' page for the request created in step 5, click 'Edit item metadata'. Notice the form shown is not the 'Standard' form (its the IncDocs one). Edit any of the metadata values, click 'Save'. Verify the new metadata is saved correctly. 8) Apply patch. Repeat 7). Notice the form shown is the 'Standard' form now. Edit any of the metadata values, click "Save". Verify the new medata is saved correctly. Created attachment 182899 [details] [review] Bug 40026: Update edit item metadata screen header Created attachment 182900 [details] [review] Bug 40026: 'Cancel' edit item metadata returns to request, not table view (In reply to David Nind from comment #4) > Not sure what to do after step 7 for testing - no patch is applied yet. > > After that step, I applied the patch and restarted everything. > > Now when I access the ILL request I created, I get a 500 error - which I > assume is because of step 6 that credentials are required. Hi David thank you for your time here. It appears I've had an incomplete test plan, apologies for that. I've updated the test plan, would you please take a look again when convenient? Thank you. (In reply to Pedro Amorim from comment #8) > (In reply to David Nind from comment #4) > > Not sure what to do after step 7 for testing - no patch is applied yet. > > > > After that step, I applied the patch and restarted everything. > > > > Now when I access the ILL request I created, I get a 500 error - which I > > assume is because of step 6 that credentials are required. > > Hi David thank you for your time here. It appears I've had an incomplete > test plan, apologies for that. > I've updated the test plan, would you please take a look again when > convenient? Thank you. For step 8, I now get an error 500. I'm not sure that I got the sequence right: 1. Step 7 - everything works as per the test plan 2. For step 8, I get an error 500. I applied the patch, restarted everything, then refreshed the page. Then I get a error 500 when I click 'Edit item metadata'. From the logs: ==> /var/log/koha/kohadev/plack-error.log <== Template process failed: file error - /kohadevbox/koha/Koha/ILL/Backend/intra-includes/edititem.inc: not found at /kohadevbox/koha/C4/Templates.pm line 146. ==> /var/log/koha/kohadev/plack-intranet-error.log <== [2025/06/16 05:36:00] [WARN] illrequestattributes is DEPRECATED in favor of extended_attributes at /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/PTFSEurope/IncDocs.pm line 358. Created attachment 183276 [details] [review] Bug 40026: Edit item metadata should present Standard form if AutoILLBackendPriority is in use When the AutoILLBackendPriority system preference is enabled, the form that was used is always the Standard form, regardless of which backend the request ends up on. It only makes sense that when editing an ILL request's item metadata, the form shown is also the Standard form if AutoILLBackendPriority is in use. Test plan, k-t-d, don't apply patch: 1) Enable ILLModule 2) Install an external backend, e.g. the libkey lending tool (IncDocs) backend plugin: https://github.com/openfifth/koha-ill-libkey-lending-tool/releases/tag/v2.0.3 3) Restart plack $ koha-plack --restart kohadev 4) Create a new IncDocs ILL request: <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=IncDocs 5) Add a DOI '123', a cardnumber '42' and any library. Click 'Make request'. 6) Enable AutoILLBackendPriority system preference by ticking 'IncDocs'. This is only done now to simplify the test plan, as creating an 'IncDocs' request using AutoILLBackendPriority requires credentials configuration. 7) Back on the 'Manage request' page for the request created in step 5, click 'Edit item metadata'. Notice the form shown is not the 'Standard' form (its the IncDocs one). Edit any of the metadata values, click 'Save'. Verify the new metadata is saved correctly. 8) Apply patch. Repeat 7). Notice the form shown is the 'Standard' form now. Edit any of the metadata values, click "Save". Verify the new medata is saved correctly. Created attachment 183277 [details] [review] Bug 40026: Update edit item metadata screen header Created attachment 183278 [details] [review] Bug 40026: 'Cancel' edit item metadata returns to request, not table view (In reply to David Nind from comment #9) > For step 8, I now get an error 500. Thank you, David. Please try again. I had accidentally submitted a 24.11.x version of the patch but have corrected now. (In reply to Pedro Amorim from comment #13) > (In reply to David Nind from comment #9) > > For step 8, I now get an error 500. > > Thank you, David. Please try again. I had accidentally submitted a 24.11.x > version of the patch but have corrected now. Thanks Pedro! When I edit the request in step 8, I get the standard form and the option to choose the type. Selecting any of the type options doesn't show any fields for the request type. After clicking update, then "Edit item metadata" displays the fields for the previously selected type. Selecting the type doesn't change the fields until you click update, then "Edit item metadata". Not sure that I've explained this very well, or if this is what is expected. (In reply to David Nind from comment #14) > (In reply to Pedro Amorim from comment #13) > > (In reply to David Nind from comment #9) > > > For step 8, I now get an error 500. > > > > Thank you, David. Please try again. I had accidentally submitted a 24.11.x > > version of the patch but have corrected now. > > Thanks Pedro! > > When I edit the request in step 8, I get the standard form and the option to > choose the type. > > Selecting any of the type options doesn't show any fields for the request > type. > > After clicking update, then "Edit item metadata" displays the fields for the > previously selected type. > > Selecting the type doesn't change the fields until you click update, then > "Edit item metadata". > > Not sure that I've explained this very well, or if this is what is expected. That all seems to be as expected. The bug you're describing (fields don't update) is a different one: Bug 40025 Created attachment 183289 [details] [review] Bug 40026: Edit item metadata should present Standard form if AutoILLBackendPriority is in use When the AutoILLBackendPriority system preference is enabled, the form that was used is always the Standard form, regardless of which backend the request ends up on. It only makes sense that when editing an ILL request's item metadata, the form shown is also the Standard form if AutoILLBackendPriority is in use. Test plan, k-t-d, don't apply patch: 1) Enable ILLModule 2) Install an external backend, e.g. the libkey lending tool (IncDocs) backend plugin: https://github.com/openfifth/koha-ill-libkey-lending-tool/releases/tag/v2.0.3 3) Restart plack $ koha-plack --restart kohadev 4) Create a new IncDocs ILL request: <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=IncDocs 5) Add a DOI '123', a cardnumber '42' and any library. Click 'Make request'. 6) Enable AutoILLBackendPriority system preference by ticking 'IncDocs'. This is only done now to simplify the test plan, as creating an 'IncDocs' request using AutoILLBackendPriority requires credentials configuration. 7) Back on the 'Manage request' page for the request created in step 5, click 'Edit item metadata'. Notice the form shown is not the 'Standard' form (its the IncDocs one). Edit any of the metadata values, click 'Save'. Verify the new metadata is saved correctly. 8) Apply patch. Repeat 7). Notice the form shown is the 'Standard' form now. Edit any of the metadata values, click "Save". Verify the new medata is saved correctly. Signed-off-by: David Nind <david@davidnind.com> Created attachment 183290 [details] [review] Bug 40026: Update edit item metadata screen header Signed-off-by: David Nind <david@davidnind.com> Created attachment 183291 [details] [review] Bug 40026: 'Cancel' edit item metadata returns to request, not table view Signed-off-by: David Nind <david@davidnind.com> (In reply to Pedro Amorim from comment #15) > That all seems to be as expected. > The bug you're describing (fields don't update) is a different one: > Bug 40025 Thanks Pedro! Signed off. |