Bug 27578

Summary: Searchid not initialized when adding a new record
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: CatalogingAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: minor    
Priority: P5 - low CC: andrew, fridolin.somers, kyle, m.de.rooy, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.04,20.05.10
Circulation function:
Attachments: Bug 27578: Initialize searchid as blank when not populated
Bug 27578: Initialize searchid as blank when not populated
Bug 27578: Initialize searchid as blank when not populated

Description Nick Clemens (kidclamp) 2021-01-29 13:47:09 UTC
addbiblio.pl takes a searchid parameter which is built into several urls, however, when adding a new biblio and not coming from a search this value is never initialized and there is a warn
Comment 1 Nick Clemens (kidclamp) 2021-01-29 13:49:23 UTC
Created attachment 116031 [details] [review]
Bug 27578: Initialize searchid as blank when not populated

This patch simply sets the searchid to a blank string if not passed in

To test:
1 - Add a new biblio and save it
2 - Check the logs: /var/log/koha/kohadev/plack-intranet-error.log (or similar)
3 - Note warn about uninitialized value
4 - Apply patch
5 - Add a new biblio
6 - No warn
Comment 2 Phil Ringnalda 2021-02-24 05:28:01 UTC
Created attachment 117238 [details] [review]
Bug 27578: Initialize searchid as blank when not populated

This patch simply sets the searchid to a blank string if not passed in

To test:
1 - Add a new biblio and save it
2 - Check the logs: /var/log/koha/kohadev/plack-intranet-error.log (or similar)
3 - Note warn about uninitialized value
4 - Apply patch
5 - Add a new biblio
6 - No warn

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 3 Marcel de Rooy 2021-02-26 08:44:29 UTC
Created attachment 117366 [details] [review]
Bug 27578: Initialize searchid as blank when not populated

This patch simply sets the searchid to a blank string if not passed in

To test:
1 - Add a new biblio and save it
2 - Check the logs: /var/log/koha/kohadev/plack-intranet-error.log (or similar)
3 - Note warn about uninitialized value
4 - Apply patch
5 - Add a new biblio
6 - No warn

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Jonathan Druart 2021-03-01 10:29:05 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 5 Fridolin Somers 2021-03-04 09:36:34 UTC
In my opinion we should use q{} for empty strings.
Comment 6 Fridolin Somers 2021-03-04 09:36:52 UTC
Pushed to 20.11.x for 20.11.04
Comment 7 Andrew Fuerste-Henry 2021-03-05 21:22:30 UTC
Pushed to 20.05.x for 20.05.10
Comment 8 Victor Grousset/tuxayo 2021-03-22 16:06:10 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.