[Bug 40220] New: API Incorrectly Requires Mandatory Extended Attributes Not Visible in OPAC
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 Bug ID: 40220 Summary: API Incorrectly Requires Mandatory Extended Attributes Not Visible in OPAC Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: REST API Assignee: leo.stoyanov@bywatersolutions.com Reporter: leo.stoyanov@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com When registering patrons via /api/v1/patrons, the endpoint requires ALL mandatory extended attributes, including those not set to "Editable in OPAC". This is inconsistent with OPAC behavior, where only attributes that are both mandatory and visible/editable in OPAC are required. For external systems acting as OPAC replacements, such as Aspen Discovery, this creates unnecessary validation failures. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 Leo Stoyanov <leo.stoyanov@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 --- Comment #1 from Leo Stoyanov <leo.stoyanov@bywatersolutions.com> --- Created attachment 183422 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183422&action=edit Bug 40220: Added Consderation of API Interface for Mandatory Extended Attributes Test Plan: 1. Create an extended borrower attribute with: mandatory = 1 (checked), opac_display = 1, and opac_editable = 0 (unchecked - not editable in OPAC). 2. Setup your Postman, or any other mock API software, to obtain an OAuth token (/api/v1/oauth/token) and to register a patron (/api/v1/patrons). 3. With the OAuth token, send a POST request to /api/v1/patrons with valid patron data and missing mandatory extended attribute data. 4. Observe the API response wtih the 400 error. Despite this attribute not being required in the OPAC, the API requires it. 5. Apply the patch and repeat step 3. Observe the API response with the patron data returend, indicating the patron has been created. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |george@nekls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |40219 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40219 [Bug 40219] Welcome Email Sent on Failed Patron Registration via API -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=35635 CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Needs Signoff |Failed QA --- Comment #2 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- After bug 35635 attributes may be made mandatory/not in the intranet and OPAC distinctly and an attribute cannot be mandatory via the OPAC without being visible via the OPAC. However, bug 35635 explicitly makes the API follow staff client requirements rather than OPAC requirements. We're generally moving toward making the API align with the OPAC for patron actions. Following that logic, should we switch the API to following the OPAC mandatory value on attributes? Or should attributes also have an "API Mandatory" value? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org --- Comment #3 from Christopher Brannon <cbrannon@cdalibrary.org> --- Because API can be used for both staff and public uses, it seems that we absolutely need some way of indicating on the remote end what the end use is for. We could have an API setting in the attributes, but that would lock it into only one behavior. I'm thinking that maybe, so as not to have to duplicate all get functionality for public or staff, that there needs to be some indicator in the request that specifies end use (public/staff). But would that be too easy to circumvent? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40420 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 --- Comment #4 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- *** Bug 41603 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|leo.stoyanov@bywatersolutio |lucas@bywatersolutions.com |ns.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183422|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 192110 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192110&action=edit Bug 40220: Add x-koha-override option for behaving like OPAC when adding patrons via REST API -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40220 Bug 40220 depends on bug 40219, which changed state. Bug 40219 Summary: Welcome Email Sent on Failed Patron Registration via API https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40219 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org