https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17118

Aleisha Amohia <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #54641|0                           |1
        is obsolete|                            |

--- Comment #2 from Aleisha Amohia <[email protected]> ---
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 <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to