Bugzilla – Attachment 55953 Details for
Bug 15752
Automatically switch from circulation to new patron when a cardnumber is scanned during circulation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15752 - Automatically switch patron during circulation
Bug-15752---Automatically-switch-patron-during-cir.patch (text/plain), 4.63 KB, created by
Jonathan Druart
on 2016-09-30 10:25:47 UTC
(
hide
)
Description:
Bug 15752 - Automatically switch patron during circulation
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-09-30 10:25:47 UTC
Size:
4.63 KB
patch
obsolete
>From 2326f719a215de8465c85fc7bb98e56994443717 Mon Sep 17 00:00:00 2001 >From: Chad Billman <chad@pennmanor.net> >Date: Thu, 21 Jan 2016 10:59:01 -0500 >Subject: [PATCH] Bug 15752 - Automatically switch patron during circulation > >With this syspref enabled scanning a patron barcode into the item >barcode field during circulation will redirect you to the patron's >circulation page. > >This allows circulation with only a barcode scanner. > >Testing: > >- Enable the AutoSwitchPatron syspref >- Navigate to a patron's check out screen >- Enter a patron barcode into the "Enter item barcode" field > >Result >- Browser should be redirected to the entered patron >--- > circ/circulation.pl | 8 +++++++- > .../data/mysql/atomicupdate/Bug15752_CircAutoSwitchPatron.sql | 2 ++ > installer/data/mysql/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/circulation.pref | 7 +++++++ > 4 files changed, 17 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/Bug15752_CircAutoSwitchPatron.sql > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index fcd967d..f17cced 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -42,7 +42,7 @@ use Koha::Holds; > use C4::Context; > use CGI::Session; > use C4::Members::Attributes qw(GetBorrowerAttributes); >-use Koha::Patron; >+use Koha::Patrons; > use Koha::Patron::Debarments qw(GetDebarments); > use Koha::DateUtils; > use Koha::Database; >@@ -77,6 +77,12 @@ if (!C4::Context->userenv){ > } > } > >+if (C4::Context->preference("AutoSwitchPatron") ) { >+ if (Koha::Patrons->search( { cardnumber => $query->param('barcode')} )->count() > 0) { >+ print $query->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=".$query->param('barcode')); >+ } >+} >+ > my $barcodes = []; > my $barcode = $query->param('barcode'); > # Barcode given by user could be '0' >diff --git a/installer/data/mysql/atomicupdate/Bug15752_CircAutoSwitchPatron.sql b/installer/data/mysql/atomicupdate/Bug15752_CircAutoSwitchPatron.sql >new file mode 100644 >index 0000000..620c659 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/Bug15752_CircAutoSwitchPatron.sql >@@ -0,0 +1,2 @@ >+INSERT INTO systempreferences (variable,value,options,explanation,type) >+VALUES ('AutoSwitchPatron', '0', '', 'Auto switch to patron', 'YesNo'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 169665f..d92fedc 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -59,6 +59,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AutoSelfCheckAllowed','0','','For corporate and special libraries which want web-based self-check available from any PC without the need for a manual staff login. Most libraries will want to leave this turned off. If on, requires self-check ID and password to be entered in AutoSelfCheckID and AutoSelfCheckPass sysprefs.','YesNo'), > ('AutoSelfCheckID','','','Staff ID with circulation rights to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'), > ('AutoSelfCheckPass','','','Password to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','free'), >+('AutoSwitchPatron', '0', '', 'Auto switch to patron', 'YesNo'), > ('Babeltheque','0','','Turn ON Babeltheque content - See babeltheque.com to subscribe to this service','YesNo'), > ('Babeltheque_url_js','','','Url for Babeltheque javascript (e.g. http://www.babeltheque.com/bw_XX.js)','Free'), > ('Babeltheque_url_update','','','Url for Babeltheque update (E.G. http://www.babeltheque.com/.../file.csv.bz2)','Free'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index fc9706b..e5ad8b1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -2,6 +2,13 @@ Circulation: > # FIXME: printcirculationslips is also omitted. It _technically_ could work, but C4::Print is HLT specific and needs a little bit of refactoring. > Interface: > - >+ - pref: AutoSwitchPatron >+ choices: >+ yes: "Enable" >+ no: "Don't enable" >+ - the automatic redirection to another patron when a patron barcode is scanned instead of a book. >+ - This should not be enabled if you have overlapping patron and book barcodes. >+ - > - pref: CircAutocompl > choices: > yes: Try >-- >2.8.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 15752
:
47716
|
55953
|
57015
|
66175
|
66176
|
66177
|
67037
|
67038
|
67039
|
67174
|
67175
|
67176
|
69994
|
69995
|
69996
|
70077
|
70085
|
71359
|
71360
|
71361
|
71362
|
71363