Bug 23933 - commit_file.pl Can't call method "get_effective_marcorgcode" on an undefined value at /usr/share/koha/lib/C4/AuthoritiesMarc.pm line 578.
Summary: commit_file.pl Can't call method "get_effective_marcorgcode" on an undefined ...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 10132
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-31 11:46 UTC by Hugo Agud
Modified: 2021-06-14 21:29 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.05
Circulation function:


Attachments
Bug 23933: (bug 10132 follow-up) Fix commit_file.pl (1.04 KB, patch)
2019-11-04 11:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 23933: (bug 10132 follow-up) Fix commit_file.pl (1.11 KB, patch)
2019-11-04 17:29 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 23933: (bug 10132 follow-up) Fix commit_file.pl (1.20 KB, patch)
2019-11-08 10:22 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Agud 2019-10-31 11:46:50 UTC
When trying to commit records via command line using commit_file.pl in combination with syspref  AutoCreateAuthorities 'generate' and  BiblioAddsAuthorities  ' allow'

if marcrecods has not 003 the system stops with error:
Can't call method "get_effective_marcorgcode" on an undefined value at /usr/share/koha/lib/C4/AuthoritiesMarc.pm line 578.

It also happened with cataloguing form at admin gui, but I am not able to reproduce the error again.
Comment 1 Jonathan Druart 2019-11-04 11:23:54 UTC
Caused by my follow-up on bug 10132:
  commit 80c749df80f08be46b895715045b38cd1ded2ed1
  Bug 10132: Simplify code, call the method only once
Comment 2 Jonathan Druart 2019-11-04 11:26:33 UTC
Created attachment 94999 [details] [review]
Bug 23933: (bug 10132 follow-up) Fix commit_file.pl
Comment 3 Martin Renvoize (ashimema) 2019-11-04 17:29:56 UTC
Created attachment 95026 [details] [review]
Bug 23933: (bug 10132 follow-up) Fix commit_file.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize (ashimema) 2019-11-04 17:30:41 UTC
Fix works, Signingoff..

Wondering about Unit tests, but will leave that for QA discretion.
Comment 5 Marcel de Rooy 2019-11-08 10:22:51 UTC
Created attachment 95190 [details] [review]
Bug 23933: (bug 10132 follow-up) Fix commit_file.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Martin Renvoize (ashimema) 2019-11-08 12:57:03 UTC
Nice work!

Pushed to master for 19.11.00
Comment 7 Fridolin Somers 2019-11-15 10:19:17 UTC
Pushed to 19.05.x for 19.05.05