Bugzilla – Attachment 61946 Details for
Bug 14576
Allow automatic update of location on checkin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14576 (QA Followup) Fix undelcared use of $item Move strings from js files Delete duplicated lines
Bug-14576-QA-Followup-Fix-undelcared-use-of-item-M.patch (text/plain), 4.76 KB, created by
Nick Clemens (kidclamp)
on 2017-04-06 15:37:53 UTC
(
hide
)
Description:
Bug 14576 (QA Followup) Fix undelcared use of $item Move strings from js files Delete duplicated lines
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-04-06 15:37:53 UTC
Size:
4.76 KB
patch
obsolete
>From be8fe520d909e57861a6f12ae1c3a37bd5c13e87 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 15 Sep 2016 14:11:00 +0000 >Subject: [PATCH] Bug 14576 (QA Followup) Fix undelcared use of $item Move > strings from js files Delete duplicated lines > >--- > C4/Circulation.pm | 12 ++++-------- > C4/Items.pm | 1 + > C4/Reserves.pm | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt | 2 ++ > koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js | 4 ++-- > 5 files changed, 11 insertions(+), 10 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index d6f5f0a..fe0585d 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1383,14 +1383,10 @@ sub AddIssue { > } > ); > >- if ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ) { >- ## Item was moved to cart via UpdateItemLocationOnCheckin, anything issued should be taken off the cart. >- CartToShelf( $item->{'itemnumber'} ); >- } >- $item->{'issues'}++; >- if ( C4::Context->preference('UpdateTotalIssuesOnCirc') ) { >- UpdateTotalIssues($item->{'biblionumber'}, 1); >- } >+ if ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ) { >+ ## Item was moved to cart via UpdateItemLocationOnCheckin, anything issued should be taken off the cart. >+ CartToShelf( $item->{'itemnumber'} ); >+ } > > $item->{'issues'}++; > if ( C4::Context->preference('UpdateTotalIssuesOnCirc') ) { >diff --git a/C4/Items.pm b/C4/Items.pm >index 4e41525..50f7b25 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -623,6 +623,7 @@ sub ModItemTransfer { > my ( $itemnumber, $frombranch, $tobranch ) = @_; > > my $dbh = C4::Context->dbh; >+ my $item = GetItem( $itemnumber ); > > # Remove the 'shelving cart' location status if it is being used. > CartToShelf( $itemnumber ) if ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ); >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 97ea0f4..aa682b8 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1217,6 +1217,7 @@ sub ModReserveStatus { > my $sth_set = $dbh->prepare($query); > $sth_set->execute( $newstatus, $itemnumber ); > >+ my $item = GetItem($itemnumber); > if ( ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ) && $newstatus ) { > CartToShelf( $itemnumber ); > } >@@ -1292,6 +1293,7 @@ sub ModReserveAffect { > if ( !$transferToDo && !$already_on_shelf ); > > _FixPriority( { biblionumber => $biblionumber } ); >+ my $item = GetItem($itemnumber); > if ( ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ) ) { > CartToShelf( $itemnumber ); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >index 22fb001..5aa3576 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >@@ -44,6 +44,8 @@ > var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" ); > var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" ); > var MSG_LOADING = _( "Loading..." ); >+ var MSG_ALL_VALUE_WARN = _("Note: _ALL_ value will override all other values"); >+ var MSG_UPD_LOC_FORMAT_WARN = _("The following values are not formatted correctly:"); > > //]]> > </script> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js b/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >index ff74b02..f86abee 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >@@ -141,7 +141,7 @@ $( document ).ready( function () { > $("#pref_UpdateItemLocationOnCheckin").change(function(){ > var the_text = $(this).val(); > var alert_text = ''; >- if ( the_text.indexOf('_ALL_:') != -1 ) alert_text= _("Note: _ALL_ value will override all other values") + '\n'; >+ if ( the_text.indexOf('_ALL_:') != -1 ) alert_text = MSG_ALL_VALUE_WARN + '\n'; > var split_text =the_text.split("\n"); > var alert_issues = ''; > var issue_count = 0; >@@ -152,7 +152,7 @@ $( document ).ready( function () { > issue_count++; > } > } >- if (issue_count) alert_text += "\n"+_("The following values are not formatted correctly:")+"\n"+alert_issues; >+ if (issue_count) alert_text += "\n"+ MSG_UPD_LOC_FORMAT_WARN +"\n"+alert_issues; > if ( alert_text.length ) alert(alert_text); > }); > >-- >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 14576
:
46454
|
46455
|
46456
|
48258
|
48259
|
50662
|
50663
|
52195
|
52196
|
52197
|
52204
|
52205
|
52206
|
52222
|
52223
|
52224
|
52365
|
53112
|
53113
|
53114
|
53115
|
54281
|
54644
|
54645
|
54646
|
54647
|
54648
|
54654
|
55587
|
60658
|
60659
|
60660
|
60661
|
60662
|
60663
|
60747
|
60748
|
60751
|
61940
|
61941
|
61942
|
61944
|
61945
|
61946
|
61947
|
61948
|
61949
|
61950
|
64656
|
64657
|
64658
|
67610
|
67611
|
68297
|
70795
|
70796
|
70797
|
72032
|
72033
|
72034
|
75661
|
75662
|
75663
|
79245
|
79246
|
79995
|
79996
|
83113
|
83114
|
83115
|
83696
|
83697
|
83698
|
85406
|
85850
|
85851
|
85852
|
85853
|
86812
|
86813
|
86814
|
86815
|
86816
|
87040
|
87061
|
87144
|
87145
|
87146
|
87147
|
87148
|
87149
|
87150
|
87151
|
87925
|
88451
|
88452
|
88453
|
88454
|
88455
|
88456
|
88457
|
88458
|
88459
|
88646
|
88647
|
88648
|
88649
|
88650
|
88651
|
88652
|
88653
|
88654