Bugzilla – Attachment 183422 Details for
Bug 40220
API Incorrectly Requires Mandatory Extended Attributes Not Visible in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40220: Added Consderation of API Interface for Mandatory Extended Attributes
Bug-40220-Added-Consderation-of-API-Interface-for-.patch (text/plain), 1.47 KB, created by
Leo Stoyanov
on 2025-06-23 15:58:14 UTC
(
hide
)
Description:
Bug 40220: Added Consderation of API Interface for Mandatory Extended Attributes
Filename:
MIME Type:
Creator:
Leo Stoyanov
Created:
2025-06-23 15:58:14 UTC
Size:
1.47 KB
patch
obsolete
>From 3a8506d549dcf817b077a068314b2ab44f0507e8 Mon Sep 17 00:00:00 2001 >From: Leo Stoyanov <leo.stoyanov@bywatersolutions.com> >Date: Mon, 23 Jun 2025 15:46:38 +0000 >Subject: [PATCH] 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. >--- > Koha/Patron.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index dcfff7aeb0..06c8a86210 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -2403,7 +2403,7 @@ sub extended_attributes { > 'borrower_attribute_types_branches.b_branchcode' => undef, > }; > >- if ( $interface eq 'opac' ) { >+ if ( $interface eq 'opac' || $interface eq 'api' ) { > $params->{opac_editable} = 1; > } > >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40220
: 183422