From 6771c9bf4c3a7936a1ef83b9fe22c7ecc9db97b0 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 28 Mar 2017 16:39:25 +0200 Subject: [PATCH] Bug 12913: [QA Follow-up] Reword 'change item status' and add zero status The zero status should be added in @notforloans. It is a legitimate status for available books. The zero status description can be translated in the template. The 'Change item status' is confusing. We mean that we saw a notforloan status that we do not expect (read: does not exist in the table). Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall (cherry picked from commit 664d6534171677455f3cf1467e8726146714133a) Signed-off-by: Katrin Fischer --- .../prog/en/modules/tools/inventory.tt | 14 ++++++++++---- tools/inventory.pl | 7 +++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt index ef920676fc..b287b51072 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -180,12 +180,18 @@ $(document).ready(function(){ [% status.fieldname %]
    [% FOREACH value IN status.values %] - [% IF (value.lib) %]
  • + [% IF (value.lib) %] +
  • -
  • [% END %] + + [% END %] [% END %]
@@ -294,7 +300,7 @@ $(document).ready(function(){ [% ELSIF result.problem == 'missingitem' %]

Item missing

[% ELSIF result.problem == 'changestatus' %] -

Change item status

+

Unknown not-for-loan status

[% ELSIF result.problem == 'not_scanned' %]

Item should have been scanned

[% END %] diff --git a/tools/inventory.pl b/tools/inventory.pl index 52cc83d58e..4987ed6ed5 100755 --- a/tools/inventory.pl +++ b/tools/inventory.pl @@ -101,11 +101,14 @@ for my $statfield (qw/items.notforloan items.itemlost items.withdrawn items.dama $hash->{authcode} = GetAuthValCode($statfield); if ($hash->{authcode}){ my $arr = GetAuthorisedValues($hash->{authcode}); - $hash->{values} = $arr; - push @$statuses, $hash; if ( $statfield eq 'items.notforloan') { + # Add notforloan == 0 to the list of possible notforloan statuses + # The lib value is replaced in the template + push @$arr, { authorised_value => 0, id => 'stat0' , lib => 'ignore' }; @notforloans = map { $_->{'authorised_value'} } @$arr; } + $hash->{values} = $arr; + push @$statuses, $hash; } } -- 2.39.5