[Koha-bugs] [Bug 31381] [Intranet/REST-API] Searching patrons by letter broken when using non-mandatory extended attributes

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 23 11:56:41 CET 2022


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

Nick Clemens <nick at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #144173|0                           |1
        is obsolete|                            |
 Attachment #144188|0                           |1
        is obsolete|                            |

--- Comment #16 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 144196
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144196&action=edit
Bug 31381: Handle null attributes in list

This patch allows null values to be returned in patron attributes
to prevent a crash when searching patrons

To test:
1 - Add a NULL attribute to a borrower, in sample data, Edna Acosta
    sudo koha-mysql kohadev
    INSERT INTO borrower_attributes (borrowernumber,code,attribute) VALUES
(5,'SHOW_BCODE',NULL);
2 - Browse to 'Home->Patrons'
    http://localhost:8081/cgi-bin/koha/members/members-home.pl
3 - Click 'Browse by last name: A'
4 - Datatables error:
    Expected string - got null
5 - Apply patch
6 - Restart all
7 - Browse by last name: A
8 - Success!

Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list