[Bug 23380] New: GuessAuthTypeCode should check authority type exists
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23380 Bug ID: 23380 Summary: GuessAuthTypeCode should check authority type exists Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl The method GuessAuthTypeCode is used when importing from batch or z3950/SRU to find the local authority type depending on MARC flavour and authority record fields. This method should check that found type is configured. Otherwise it can generate software errors when type code is used to fetch Koha::Authority::Type. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23380 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23380 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23380 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 91797 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91797&action=edit Bug 23380: GuessAuthTypeCode should check authority type exists The method GuessAuthTypeCode is used when importing from batch or z3950/SRU to find the local authority type depending on MARC flavour and authority record fields. This method should check that found type is configured. Otherwise it can generate software errors when type code is used to fetch Koha::Authority::Type. Test plan : 1) Delete an authority type, ie NP 2) Connect to a z3950/SRU authority server 3) Look for authorities of this type 4) Import an authority 5) Without patch you get error : Can't call method "auth_tag_to_report" on an undefined value at /home/koha/src/C4/AuthoritiesMarc.pm line 757. 6) With patch you see record edition and in logs "Authority type NP not configured" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23380 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Please cover subroutines changes by tests. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23380 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91797|0 |1 is obsolete| | --- Comment #3 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 145703 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145703&action=edit Bug 23380: GuessAuthTypeCode should check authority type exists The method GuessAuthTypeCode is used when importing from batch or z3950/SRU to find the local authority type depending on MARC flavour and authority record fields. This method should check that found type is configured. Otherwise it can generate software errors when type code is used to fetch Koha::Authority::Type. Test plan : 1) Delete an authority type, ie NP 2) Connect to a z3950/SRU authority server 3) Look for authorities of this type 4) Import an authority 5) Without patch you get error : Can't call method "auth_tag_to_report" on an undefined value at /home/koha/src/C4/AuthoritiesMarc.pm line 757. 6) With patch you see record edition and in logs "Authority type NP not configured" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23380 --- Comment #4 from Fridolin Somers <fridolin.somers@biblibre.com> --- Fixed for current master. Using Koha::Authority::Types->search->get_column('authtypecode') is better. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23380 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Fridolin Somers from comment #4)
Fixed for current master.
Using Koha::Authority::Types->search->get_column('authtypecode') is better.
Which means? Do we close this one? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23380 --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #5)
(In reply to Fridolin Somers from comment #4)
Fixed for current master.
Using Koha::Authority::Types->search->get_column('authtypecode') is better.
Which means? Do we close this one?
No I mean rebased on current master and patch slightly changed -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org