REST API route /patrons has extended_attributes available (x-koha-embed) but it's actually not working. GET /api/v1/patrons: unhandled exception (Koha::Exceptions::BadParameter)<<Cannot find Koha::Object class for extended_attributes>> Koha::REST::Plugin::Exceptions::__ANON__ /kohadevbo x/koha/Koha/REST/Plugin/Exceptions.pm (73) It's missing the relationship named "extended_attributes".
Created attachment 130448 [details] [review] Bug 30074: Add missing extended_attributes rs in DBIC schema REST API route /patrons has extended_attributes available (x-koha-embed) but it's actually not working. GET /api/v1/patrons: unhandled exception (Koha::Exceptions::BadParameter)<<Cannot find Koha::Object class for extended_attributes>> Koha::REST::Plugin::Exceptions::__ANON__ /kohadevbo x/koha/Koha/REST/Plugin/Exceptions.pm (73) It's missing the relationship named "extended_attributes". Test plan: Create a new patron attribute CODE and a value for a patron Hit /api/v1/patrons?q={"extended_attributes.type":"CODE"}
A test would be nice.
Created attachment 130667 [details] [review] Bug 30074: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 130668 [details] [review] Bug 30074: Add missing extended_attributes rs in DBIC schema REST API route /patrons has extended_attributes available (x-koha-embed) but it's actually not working. GET /api/v1/patrons: unhandled exception (Koha::Exceptions::BadParameter)<<Cannot find Koha::Object class for extended_attributes>> Koha::REST::Plugin::Exceptions::__ANON__ /kohadevbo x/koha/Koha/REST/Plugin/Exceptions.pm (73) It's missing the relationship named "extended_attributes". Test plan: Create a new patron attribute CODE and a value for a patron Hit /api/v1/patrons?q={"extended_attributes.type":"CODE"} Also: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => FAIL: Tests fail, boooo 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 130724 [details] [review] Bug 30074: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 130725 [details] [review] Bug 30074: Add missing extended_attributes rs in DBIC schema REST API route /patrons has extended_attributes available (x-koha-embed) but it's actually not working. GET /api/v1/patrons: unhandled exception (Koha::Exceptions::BadParameter)<<Cannot find Koha::Object class for extended_attributes>> Koha::REST::Plugin::Exceptions::__ANON__ /kohadevbo x/koha/Koha/REST/Plugin/Exceptions.pm (73) It's missing the relationship named "extended_attributes". Test plan: Create a new patron attribute CODE and a value for a patron Hit /api/v1/patrons?q={"extended_attributes.type":"CODE"} Also: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => FAIL: Tests fail, boooo 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
All good, PQA
Pushed to master for 22.05, thanks to everybody involved [U+1F984]