Bug 30534

Summary: borrowers.guarantorid not present on database
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: REST APIAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: arthur.suzuki, jonathan.druart, kyle, lucas, martin.renvoize, tomascohen, victor
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.06
Bug Depends on: 14570    
Bug Blocks:    
Attachments: Bug 30534: Remove guarantor_id attribute from the patron object
Bug 30534: Remove guarantor_id attribute from the patron object
Bug 30534: Remove guarantor_id attribute from the patron object

Description Tomás Cohen Arazi 2022-04-13 19:31:13 UTC
The column was removed on bug 14570 (19.11) but the API mapping was inadvertedly kept.

We should remove it.

To test:
- Try to filter a request by that attribute:

http://kohadev-intra.myDNSname.org:8081/api/v1/patrons?guarantor_id=1
http://kohadev-intra.myDNSname.org:8081/api/v1/patrons?q={"guarantor_id"=1}

=> FAIL: You get a 500
Comment 1 Tomás Cohen Arazi 2022-04-13 20:09:22 UTC
Created attachment 133282 [details] [review]
Bug 30534: Remove guarantor_id attribute from the patron object

This patch removes an attribute that was actually removed 3 years ago
and causes an exception when trying to search for it. The API responses
don't include it anyways.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 David Nind 2022-04-19 10:50:11 UTC
Created attachment 133398 [details] [review]
Bug 30534: Remove guarantor_id attribute from the patron object

This patch removes an attribute that was actually removed 3 years ago
and causes an exception when trying to search for it. The API responses
don't include it anyways.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2022-04-21 09:27:36 UTC
Created attachment 133530 [details] [review]
Bug 30534: Remove guarantor_id attribute from the patron object

This patch removes an attribute that was actually removed 3 years ago
and causes an exception when trying to search for it. The API responses
don't include it anyways.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Jonathan Druart 2022-04-21 09:28:27 UTC
There are more occurrences that haven't been removed, see bug 14570 comment 251
Comment 5 Katrin Fischer 2022-04-21 22:43:17 UTC
The bug description makes it sound a bit like the column should be in the database, but I think this is about removing some left-over code, right?
Comment 6 Fridolin Somers 2022-04-25 20:02:03 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 7 Tomás Cohen Arazi 2022-04-28 11:41:06 UTC
*** Bug 27077 has been marked as a duplicate of this bug. ***
Comment 8 Kyle M Hall 2022-05-06 14:58:50 UTC
Pushed to 21.11.x for 21.11.06
Comment 9 Victor Grousset/tuxayo 2022-06-17 03:09:16 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.