Bugzilla – Attachment 173891 Details for
Bug 37863
Patron card batches don't detect when the patron is already in the list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37863: Fix checking if a patron is already in the list adding users to a patron card batch
Bug-37863-Fix-checking-if-a-patron-is-already-in-t.patch (text/plain), 1.89 KB, created by
Emily Lamancusa (emlam)
on 2024-11-01 20:00:45 UTC
(
hide
)
Description:
Bug 37863: Fix checking if a patron is already in the list adding users to a patron card batch
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2024-11-01 20:00:45 UTC
Size:
1.89 KB
patch
obsolete
>From e3829f6cbb586deafad35b6992c9713aa219edd7 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Adolfo=20Rodr=C3=ADguez?= <adolfo.rodriguez@xercode.es> >Date: Mon, 9 Sep 2024 09:20:08 +0200 >Subject: [PATCH] Bug 37863: Fix checking if a patron is already in the list > adding users to a patron card batch > >If the patron is already in the card batch it won't add it and it will show an error message > >Test plan: >1 Create or edit an patron card batch >2 Try adding twice or more the same patron. It will show a success message everytime and you will end up with the same patron several times in the card batch >3 Apply patch, restart services >4 Repeat step 2. The first time you click on add user, it will do it and show the success message (Patron 'Patron name' added.), but after that it won't add the user and it will display an error message (Patron 'Patron name' is already in the list.) > >Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >--- > .../prog/en/modules/patroncards/edit-batch.tt | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt >index c9a17827c1..55873393ad 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt >@@ -231,7 +231,12 @@ > }; > > function add_user(borrowernumber) { >- $("#bor_num_list").val($("#bor_num_list").val()+borrowernumber+"\r\n"); >+ var list = $("#bor_num_list").val(); >+ if (list.indexOf(borrowernumber) == -1) { >+ $("#bor_num_list").val(list+borrowernumber+"\r\n"); >+ } else { >+ return -1; >+ } > } > > function DeDuplicate() { >-- >2.34.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 37863
:
171170
|
171233
| 173891