Bug 40585

Summary: Prevent crash on biblionumber in addbybiblionumber.pl
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Marcel de Rooy <m.de.rooy>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 40585: Check on Biblios->find in addbybiblionumber scripts
Bug 40585: Check on Biblios->find in addbybiblionumber scripts
Bug 40585: (follow-up) Display error if no records were found

Description Marcel de Rooy 2025-08-04 07:48:06 UTC
Just jumping to the next biblionumber (and adding found biblio recs) is more user friendly than crashing without any further clarification to the user.
Comment 1 Marcel de Rooy 2025-08-04 08:08:32 UTC
Created attachment 185080 [details] [review]
Bug 40585: Check on Biblios->find in addbybiblionumber scripts

Just jumping to the next biblionumber (and adding found biblio recs) is
more user friendly than crashing without any further clarification to
the user.
Note that this should be a rare exception when the URL is not manipulated
(someone deleting a biblio while another wants to add it to a list).
For another bug: The template is not designed to handle the situation that
no biblio is found at all.

Test plan:
Select a biblio to add to a list and add a not-existent biblionumber
to the URL.
Without this patch, that URL will crash. With this patch, it will
silently ignore a wrong biblionumber.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Owen Leonard 2025-08-15 11:19:19 UTC
Created attachment 185439 [details] [review]
Bug 40585: Check on Biblios->find in addbybiblionumber scripts

Just jumping to the next biblionumber (and adding found biblio recs) is
more user friendly than crashing without any further clarification to
the user.
Note that this should be a rare exception when the URL is not manipulated
(someone deleting a biblio while another wants to add it to a list).
For another bug: The template is not designed to handle the situation that
no biblio is found at all.

Test plan:
Select a biblio to add to a list and add a not-existent biblionumber
to the URL.
Without this patch, that URL will crash. With this patch, it will
silently ignore a wrong biblionumber.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Owen Leonard 2025-08-15 11:19:21 UTC
Created attachment 185440 [details] [review]
Bug 40585: (follow-up) Display error if no records were found