https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27853 Bug ID: 27853 Summary: POST /patrons doesn't enforce mandatory extended attributes Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com If there are extended attributes types that are mandatory, the POST /patrons route should fail if the request doesn't meet this requirement. Unfortunately, we have no way (yet) to pass extended attributes on the POST. So to solve this bug, we need to add a way to pass extended attributes along with the patron object. I propose: POST /patrons { "first_name": "Tomasito", ... "extended_attributes": { "SHOW_BCODE": [ 1 ], "COURSES": [ "ALGO1", "DATABASES" ] } } I choose to force them to be arrays for simplicity (they can be repeatable), but we can check the data type on the controller (i.e. if ( ref($extended_attributes) eq 'ARRAY') { # loop case } else { # scalar case } ). I'm open for opinions. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.