[Koha-bugs] [Bug 27077] New: Searching for patrons with guarantor_id criteria results in 500 error

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Nov 23 11:26:05 CET 2020


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

            Bug ID: 27077
           Summary: Searching for patrons with guarantor_id criteria
                    results in 500 error
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: REST API
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: arthur.suzuki at biblibre.com

Tried to fetch all patrons who's guarantor is "someone", got 500 error.
Due to changes in the borrower table to permit multiple guarantor.

Curl command :
<pre>
curl http://localhost:8080/api/v1/patrons?guarantor_id=42 \
    -H 'Authorization: Basic a29oYTprb2hh'
</pre>

Plack error log :
<pre>
[2020/11/23 10:20:33] [WARN] Use of uninitialized value $column_type in string
eq at /kohadevbox/koha/Koha/Object.pm line 447.
[2020/11/23 10:20:33] [WARN] DBD::mysql::st execute failed: Unknown column
'guarantorid' in 'where clause' [for Statement "SELECT `me`.`borrowernumber`,
`me`.`cardnumber`, `me`.`surname`, `me`.`firstname`, `me`.`title`,
`me`.`othernames`, `me`.`initials`, `me`.`streetnumber`, `me`.`streettype`,
`me`.`address`, `me`.`address2`, `me`.`city`, `me`.`state`, `me`.`zipcode`,
`me`.`country`, `me`.`email`, `me`.`phone`, `me`.`mobile`, `me`.`fax`,
`me`.`emailpro`, `me`.`phonepro`, `me`.`B_streetnumber`, `me`.`B_streettype`,
`me`.`B_address`, `me`.`B_address2`, `me`.`B_city`, `me`.`B_state`,
`me`.`B_zipcode`, `me`.`B_country`, `me`.`B_email`, `me`.`B_phone`,
`me`.`dateofbirth`, `me`.`branchcode`, `me`.`categorycode`,
`me`.`dateenrolled`, `me`.`dateexpiry`, `me`.`date_renewed`,
`me`.`gonenoaddress`, `me`.`lost`, `me`.`debarred`, `me`.`debarredcomment`,
`me`.`contactname`, `me`.`contactfirstname`, `me`.`contacttitle`,
`me`.`borrowernotes`, `me`.`relationship`, `me`.`sex`, `me`.`password`,
`me`.`flags`, `me`.`userid`, `me`.`opacnote`, `me`.`contactnote`, `me`.`sort1`,
`me`.`sort2`, `me`.`altcontactfirstname`, `me`.`altcontactsurname`,
`me`.`altcontactaddress1`, `me`.`altcontactaddress2`,
`me`.`altcontactaddress3`, `me`.`altcontactstate`, `me`.`altcontactzipcode`,
`me`.`altcontactcountry`, `me`.`altcontactphone`, `me`.`smsalertnumber`,
`me`.`sms_provider_id`, `me`.`privacy`, `me`.`privacy_guarantor_fines`,
`me`.`privacy_guarantor_checkouts`, `me`.`checkprevcheckout`,
`me`.`updated_on`, `me`.`lastseen`, `me`.`lang`, `me`.`login_attempts`,
`me`.`overdrive_auth_token`, `me`.`anonymized`, `me`.`autorenew_checkouts` FROM
`borrowers` `me` WHERE ( `guarantorid` LIKE ? )" with ParamValues: 0="%42%"] at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836.

</pre>

-- 
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