Bugzilla – Attachment 136502 Details for
Bug 31005
Cannot edit patrons in other categories if an extended attribute is mandatory and limited to a category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31005: Don't inlcude attributes only required for other categories
Bug-31005-Dont-inlcude-attributes-only-required-fo.patch (text/plain), 1.64 KB, created by
Martin Renvoize (ashimema)
on 2022-06-24 14:30:55 UTC
(
hide
)
Description:
Bug 31005: Don't inlcude attributes only required for other categories
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-06-24 14:30:55 UTC
Size:
1.64 KB
patch
obsolete
>From 9c7d3ad4f6cbd15ea64401b0581c25e55fde9d55 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 23 Jun 2022 17:29:26 +0000 >Subject: [PATCH] Bug 31005: Don't inlcude attributes only required for other > categories > >To test: > 1 - Create a new patron attribute - check boxes to make it mandatory and visible etc. > 2 - Limit it to 'Patron' or other category > 3 - Edit a patron not in that category > 4 - Attempt to save > 5 - 500 Error > 6 - Missing mandatory extended attribute (type=MAND) > 7 - Apply patch > 8 - Attempt aedit again > 9 - It succeeds! >10 - Edit a patron in the category with MAND required >11 - on the edit page, right click teh attribute - click 'delete node' >12 - Submit the form >13 - 500 error, but this time that's good, the attribute check works > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Patron.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index ae6b7e2367..c4788eaa68 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -1707,8 +1707,9 @@ sub extended_attributes { > Koha::Patron::Attribute::Types->search( > { > mandatory => 1, >+ category_code => [ undef, $self->categorycode ], > 'borrower_attribute_types_branches.b_branchcode' => >- undef >+ undef, > }, > { join => 'borrower_attribute_types_branches' } > )->get_column('code'); >-- >2.20.1
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 31005
:
136454
|
136455
|
136499
|
136500
|
136501
| 136502