Bugzilla – Attachment 71099 Details for
Bug 20110
Don't allow adding same user multiple times to same budget fund
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20110: Adding same user multiple times to same budget
Bug-20110-Adding-same-user-multiple-times-to-same-.patch (text/plain), 1.79 KB, created by
Mark Tompsett
on 2018-01-31 19:46:35 UTC
(
hide
)
Description:
Bug 20110: Adding same user multiple times to same budget
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-01-31 19:46:35 UTC
Size:
1.79 KB
patch
obsolete
>From b5279d8a51bff4e02bd42118c9089c57940adf18 Mon Sep 17 00:00:00 2001 >From: Pasi Kallinen <pasi.kallinen@joensuu.fi> >Date: Wed, 31 Jan 2018 11:11:56 +0200 >Subject: [PATCH] Bug 20110: Adding same user multiple times to same budget > >In javascript, using indexOf to test if a number exists in an array >of strings doesn't work, and makes it possible to add the same user >multiple times into the same budget fund. >Make borrowernumber into string and compare that instead. > >Test plan: > >1) Go to Home -> Administration -> Budgets -> Funds -> Add Fund >2) Add a user to the fund >3) Try to add the same user again to the same fund. No error. >4) Apply patch >5) Do 1, 2, and 3 again. You should now get an error message > saying the user is already in the list. > >Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >index 21a3877..b2ac761 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >@@ -487,7 +487,7 @@ > > function add_user(borrowernumber, borrowername) { > var ids = $("#budget_users_id").val().split(':'); >- if(borrowernumber && ids.indexOf(borrowernumber) == -1) { >+ if(borrowernumber && ids.indexOf(borrowernumber.toString()) == -1) { > var li = '<li id="user_' + borrowernumber + '">' > + '<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' > + borrowernumber + '">' + borrowername + '</a> ' >-- >2.1.4
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 20110
:
71082
|
71099
|
71174