Bugzilla – Attachment 177628 Details for
Bug 38892
Patron category 'can be a guarantee' means that same category cannot be a guarantor (again)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38892: Show correct error message when we attempt to add guarantor as a child
Bug-38892-Show-correct-error-message-when-we-attem.patch (text/plain), 2.88 KB, created by
Nick Clemens (kidclamp)
on 2025-02-07 14:26:52 UTC
(
hide
)
Description:
Bug 38892: Show correct error message when we attempt to add guarantor as a child
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-02-07 14:26:52 UTC
Size:
2.88 KB
patch
obsolete
>From 662dac26e7b19f4e755ab9d415a824043e2d7376 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Wed, 15 Jan 2025 19:59:37 +0000 >Subject: [PATCH] Bug 38892: Show correct error message when we attempt to add > guarantor as a child >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >When we attempt to add child as guarantor the error message shown is 'A guarantor cannot be a guarantee.' it doesn't make sense > >To recreate: >1. Go to Patrons >2. Click 'New patron' > 'Kid' >3. Fill out surname and cardnumber >4. Under Patron guarantor, click Add guarantor >5. Search for category = Kid and choose one of the patrons >6. Choose the relationship >7. Click 'Save' > --> Error A guarantor cannot be a guarantee. >8. Apply the patch >9. repeat previous steps >10. After clicking Save > --> the error message shown is «Child patron cannot be a guarantor.» > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 3 +++ > members/memberentry.pl | 3 ++- > 2 files changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index 4f8d864690f..2c00b1a2412 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -211,6 +211,9 @@ legend.collapsed i.fa.fa-caret-down::before { > [% IF ( ERROR_child_no_guarantor ) %] > <li id="ERROR_child_no_guarantor">A child patron needs a guarantor.</li> > [% END %] >+ [% IF ( ERROR_child_is_guarantor ) %] >+ <li id="ERROR_child_is_guarantor">Child patron cannot be a guarantor.</li> >+ [% END %] > [% IF ( ERROR_guarantor_is_guarantee ) %] > <li id="ERROR_guarantor_is_guarantee">A guarantor cannot be a guarantee.</li> > [% END %] >diff --git a/members/memberentry.pl b/members/memberentry.pl >index f1fd9bfe5bd..986e0a19170 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -288,7 +288,8 @@ foreach my $guarantor (@guarantors) { > if ( ( $op eq 'cud-save' || $op eq 'cud-insert' ) > && ( $guarantor->is_child || $guarantor->is_guarantee || ( $patron && $patron->is_guarantor ) ) ) > { >- push @errors, 'ERROR_guarantor_is_guarantee'; >+ push @errors, 'ERROR_child_is_guarantor' if ( $guarantor->is_child ); >+ push @errors, 'ERROR_guarantor_is_guarantee' if ( !$guarantor->is_child ); > } > } > >-- >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 38892
:
176585
|
177134
|
177628
|
177840