Bug 27077 - Searching for patrons with guarantor_id criteria results in 500 error
Summary: Searching for patrons with guarantor_id criteria results in 500 error
Status: RESOLVED DUPLICATE of bug 30534
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Arthur Suzuki
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-23 10:26 UTC by Arthur Suzuki
Modified: 2022-04-28 11:41 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Suzuki 2020-11-23 10:26:05 UTC
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>
Comment 1 Tomás Cohen Arazi 2022-04-28 11:41:06 UTC

*** This bug has been marked as a duplicate of bug 30534 ***