From 27c398f212155d6b765e8dfe5d9d98201678c78a Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Fri, 18 Aug 2017 10:58:51 +0000 Subject: [PATCH] Bug 15752: (QA follow-up) Inform user that patron was automatically switched Test plan: 1) Start checking out to some patron - there should be no message about auto switching 2) read the another patrons card - note the patron is switched and there is a message about it at top of the main page content Followed test plan, patch worked as described. Passed QA test tool Signed-off-by: Alex Buckley Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer --- circ/circulation.pl | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 68e01fa..b41f87d 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -86,7 +86,7 @@ my $barcode = $query->param('barcode'); if (C4::Context->preference("AutoSwitchPatron") && $barcode) { if (Koha::Patrons->search( { cardnumber => $barcode} )->count() > 0) { - print $query->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=".$barcode); + print $query->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$barcode&autoswitched=1"); } } @@ -664,6 +664,7 @@ $template->param( has_modifications => $has_modifications, override_high_holds => $override_high_holds, nopermission => scalar $query->param('nopermission'), + autoswitched => $query->param("autoswitched"), ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 842e479..1226751 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -159,6 +159,10 @@ $(document).ready(function() { [% IF ( was_renewed ) %]
Patron's account has been renewed until [% expiry | $KohaDates %]
[% END %] +[% IF autoswitched %] +
Patron was automatically switched by reading the patron card during checking out. Ensure you are working with the right patron.
+[% END %] + [% IF additional_materials %]
Note about the accompanying materials:
[% additional_materials %] -- 2.1.4