[Bug 17118] New: Regression: Bug 15381 triggers error when trying to clear a linked authority
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17118 Bug ID: 17118 Summary: Regression: Bug 15381 triggers error when trying to clear a linked authority Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: MARC Authority data support Assignee: gmcharlt@gmail.com Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org To reproduce: 1. Edit a record which has a field linked to an authority record (100a for instance). 2. Click the link which triggers the tag editor. A pop-up window should be displayed. 3. In the pop-up window, click the "Clear field" button. 4. A second pop-up window opens and displays an error: Can't call method "authtypecode" on an undefined value at /authorities/blinddetail-biblio-search.pl line 61. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17118 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|gmcharlt@gmail.com |jonathan.druart@bugs.koha-c | |ommunity.org CC| |jonathan.druart@bugs.koha-c | |ommunity.org Depends on| |15381 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15381 [Bug 15381] Move the authority types related code to Koha::Authority::Type[s] - part 2 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17118 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17118 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54641 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54641&action=edit Bug 17118: (follow-up 15381) Fix regression when clearing a linked authority Changes made on bug 15381 assumed that the authid was always set. But if the user wants to clear the field of the authority, the script is called with authid=0 (FIXME...) To fix this issue, it's better to move the new calls to Koha::Authorities->find($authid)->authtypecode and Koha::Authority::Types->find($authtypecode); at the correct place Test plan: 1. Edit a record which has a field linked to an authority record (100a for instance). 2. Click the link which triggers the tag editor. A pop-up window should be displayed. 3. In the pop-up window, click the "Clear field" button. => Without this patch A second pop-up window opens and displays an error: Can't call method "authtypecode" on an undefined value at /authorities/blinddetail-biblio-search.pl line 61. => With this patch applied the field is correctly cleared. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17118 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17118 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54641|0 |1 is obsolete| | --- Comment #2 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 54671 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54671&action=edit [SIGNED-OFF] Bug 17118: (follow-up 15381) Fix regression when clearing a linked authority Changes made on bug 15381 assumed that the authid was always set. But if the user wants to clear the field of the authority, the script is called with authid=0 (FIXME...) To fix this issue, it's better to move the new calls to Koha::Authorities->find($authid)->authtypecode and Koha::Authority::Types->find($authtypecode); at the correct place Test plan: 1. Edit a record which has a field linked to an authority record (100a for instance). 2. Click the link which triggers the tag editor. A pop-up window should be displayed. 3. In the pop-up window, click the "Clear field" button. => Without this patch A second pop-up window opens and displays an error: Can't call method "authtypecode" on an undefined value at /authorities/blinddetail-biblio-search.pl line 61. => With this patch applied the field is correctly cleared. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17118 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17118 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54671|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 54956 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54956&action=edit [PASSED QA] Bug 17118: (follow-up 15381) Fix regression when clearing a linked authority Changes made on bug 15381 assumed that the authid was always set. But if the user wants to clear the field of the authority, the script is called with authid=0 (FIXME...) To fix this issue, it's better to move the new calls to Koha::Authorities->find($authid)->authtypecode and Koha::Authority::Types->find($authtypecode); at the correct place Test plan: 1. Edit a record which has a field linked to an authority record (100a for instance). 2. Click the link which triggers the tag editor. A pop-up window should be displayed. 3. In the pop-up window, click the "Clear field" button. => Without this patch A second pop-up window opens and displays an error: Can't call method "authtypecode" on an undefined value at /authorities/blinddetail-biblio-search.pl line 61. => With this patch applied the field is correctly cleared. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17118 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17118 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr Status|Pushed to Master |Pushed to Stable --- Comment #5 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.04. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org