Bug 40585 - Prevent crash on biblionumber in addbybiblionumber.pl
Summary: Prevent crash on biblionumber in addbybiblionumber.pl
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-04 07:48 UTC by Marcel de Rooy
Modified: 2025-08-15 11:19 UTC (History)
0 users

See Also:
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 (1.99 KB, patch)
2025-08-04 08:08 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 40585: Check on Biblios->find in addbybiblionumber scripts (2.00 KB, patch)
2025-08-15 11:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 40585: (follow-up) Display error if no records were found (2.18 KB, patch)
2025-08-15 11:19 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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