[Koha-bugs] [Bug 31381] New: [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 Aug 17 12:43:49 CEST 2022


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

            Bug ID: 31381
           Summary: [Intranet/REST-API] Searching patrons by letter broken
                    when using non-mandatory extended attributes
 Change sponsored?: ---
           Product: Koha
           Version: 22.05
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: REST API
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: oliver.behnke at aei.mpg.de
                CC: tomascohen at gmail.com

Hi,

searching for patrons by letter like this returns an empty list:

/cgi-bin/koha/members/members-home.pl?firstletter=A

I find the following in intranet-error.log:

[cgi:error] AH01215: [warn] OpenAPI >>> GET api/v1/patrons
[{"message":"Expected string - got
null.","path":"\\/body\\/10\\/extended_attributes\\/0\\/value"},{"message":"Expected
string - got null.","path":"\\/body\\/14\\/extended_attributes\\/0\\/value"}]:
/usr/share/koha/api/v1/app.pl, referer:
/cgi-bin/koha/members/members-home.pl?firstletter=A

We have defined a single extended attribute which isn't mandatory, so it might
not exist for some patrons. If I interpret "10" and "14" as representing
borrower_attributes.borrowernumber (table.attribute) values then "10" does
indeed lack an entry, but "14" has one. Not a smoking gun yet...

Maybe this is a regression due to this?
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27857

Cheers

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


More information about the Koha-bugs mailing list