Summary: | Regression: Bug 15381 triggers error when trying to clear a linked authority | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | MARC Authority data support | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | f.demians, jonathan.druart, kyle |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 15381 | ||
Bug Blocks: | |||
Attachments: |
Bug 17118: (follow-up 15381) Fix regression when clearing a linked authority
[SIGNED-OFF] Bug 17118: (follow-up 15381) Fix regression when clearing a linked authority [PASSED QA] Bug 17118: (follow-up 15381) Fix regression when clearing a linked authority |
Description
Owen Leonard
2016-08-12 16:28:28 UTC
Created attachment 54641 [details] [review] 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. Created attachment 54671 [details] [review] [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> Created attachment 54956 [details] [review] [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> Pushed to master for 16.11, thanks Jonathan! Pushed in 16.05. Will be in 16.05.04. |