View | Details | Raw Unified | Return to bug 34142
Collapse All | Expand All

(-)a/Koha/Database/Columns.pm (+1 lines)
Lines 229-234 sub columns { Link Here
229
            "deleted_on"                        => __("Deleted on"),
229
            "deleted_on"                        => __("Deleted on"),
230
            "location"                          => __("Shelving location"),
230
            "location"                          => __("Shelving location"),
231
            "permanent_location"                => __("Permanent shelving location"),
231
            "permanent_location"                => __("Permanent shelving location"),
232
            "sub_location"                      => __("Sublocation"),
232
            "onloan"                            => __("Due date"),
233
            "onloan"                            => __("Due date"),
233
            "cn_source"                         => __("Source of classification / shelving scheme"),
234
            "cn_source"                         => __("Source of classification / shelving scheme"),
234
            "cn_sort"                           => __("Koha normalized classification for sorting"),
235
            "cn_sort"                           => __("Koha normalized classification for sorting"),
(-)a/Koha/Item.pm (+1 lines)
Lines 1716-1721 sub to_api_mapping { Link Here
1716
        stocknumber              => 'inventory_number',
1716
        stocknumber              => 'inventory_number',
1717
        new_status               => 'new_status',
1717
        new_status               => 'new_status',
1718
        deleted_on               => undef,
1718
        deleted_on               => undef,
1719
        sub_location             => 'sub_location'
1719
    };
1720
    };
1720
}
1721
}
1721
1722
(-)a/api/v1/swagger/definitions/item.yaml (+5 lines)
Lines 220-225 properties: Link Here
220
      - string
220
      - string
221
      - "null"
221
      - "null"
222
    description: "'new' value, whatever free-text information."
222
    description: "'new' value, whatever free-text information."
223
  sub_location:
224
    type:
225
      - string
226
      - "null"
227
    description: sub_location for this item
223
  exclude_from_local_holds_priority:
228
  exclude_from_local_holds_priority:
224
    type: boolean
229
    type: boolean
225
    description: Exclude this item from local holds priority.
230
    description: Exclude this item from local holds priority.
(-)a/circ/returns.pl (-1 / +3 lines)
Lines 760-765 my $count = 0; Link Here
760
my @riloop;
760
my @riloop;
761
my $shelflocations =
761
my $shelflocations =
762
  { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' } ) };
762
  { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' } ) };
763
my $sublocation =
764
  { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.sub_location' } ) };
763
foreach ( sort { $a <=> $b } keys %returneditems ) {
765
foreach ( sort { $a <=> $b } keys %returneditems ) {
764
    my %ri;
766
    my %ri;
765
    if ( $count++ < $returned_counter ) {
767
    if ( $count++ < $returned_counter ) {
Lines 815-821 foreach ( sort { $a <=> $b } keys %returneditems ) { Link Here
815
        $ri{location} = $item->location;
817
        $ri{location} = $item->location;
816
        my $shelfcode = $ri{'location'};
818
        my $shelfcode = $ri{'location'};
817
        $ri{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
819
        $ri{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
818
820
        $ri{sub_location} = $sublocation->{$item->sub_location} if ( defined( $item->sub_location ) && defined($sublocation) && exists( $sublocation->{$item->sub_location} ) );
819
    }
821
    }
820
    else {
822
    else {
821
        last;
823
        last;
(-)a/installer/data/mysql/atomicupdate/bug_34142.pl (+19 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "34142",
5
    description => "Add column sub_location to (deleted)items table",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        if( !column_exists( 'items', 'sub_location' ) ) {
11
            $dbh->do(q{ALTER TABLE items ADD COLUMN sub_location VARCHAR(80) DEFAULT NULL AFTER permanent_location});
12
            say $out "Added new column items.sub_location";
13
        }
14
        if( !column_exists( 'deleteditems', 'sub_location' ) ) {
15
            $dbh->do(q{ALTER TABLE deleteditems ADD COLUMN sub_location VARCHAR(80) DEFAULT NULL AFTER permanent_location});
16
            say $out "Added new column deleteditems.sub_location";
17
        }
18
    },
19
};
(-)a/installer/data/mysql/kohastructure.sql (+2 lines)
Lines 2767-2772 CREATE TABLE `deleteditems` ( Link Here
2767
  `deleted_on` datetime DEFAULT NULL COMMENT 'date/time of deletion',
2767
  `deleted_on` datetime DEFAULT NULL COMMENT 'date/time of deletion',
2768
  `location` varchar(80) DEFAULT NULL COMMENT 'authorized value for the shelving location for this item (MARC21 952$c)',
2768
  `location` varchar(80) DEFAULT NULL COMMENT 'authorized value for the shelving location for this item (MARC21 952$c)',
2769
  `permanent_location` varchar(80) DEFAULT NULL COMMENT 'linked to the CART and PROC temporary locations feature, stores the permanent shelving location',
2769
  `permanent_location` varchar(80) DEFAULT NULL COMMENT 'linked to the CART and PROC temporary locations feature, stores the permanent shelving location',
2770
  `sub_location` varchar(80) DEFAULT NULL COMMENT 'authorized value for the sublocation for this item',
2770
  `onloan` date DEFAULT NULL COMMENT 'defines if item is checked out (NULL for not checked out, and due date for checked out)',
2771
  `onloan` date DEFAULT NULL COMMENT 'defines if item is checked out (NULL for not checked out, and due date for checked out)',
2771
  `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source used on this item (MARC21 952$2)',
2772
  `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source used on this item (MARC21 952$2)',
2772
  `cn_sort` varchar(255) DEFAULT NULL COMMENT 'normalized form of the call number (MARC21 952$o) used for sorting',
2773
  `cn_sort` varchar(255) DEFAULT NULL COMMENT 'normalized form of the call number (MARC21 952$o) used for sorting',
Lines 3994-3999 CREATE TABLE `items` ( Link Here
3994
  `deleted_on` datetime DEFAULT NULL COMMENT 'date/time of deletion',
3995
  `deleted_on` datetime DEFAULT NULL COMMENT 'date/time of deletion',
3995
  `location` varchar(80) DEFAULT NULL COMMENT 'authorized value for the shelving location for this item (MARC21 952$c)',
3996
  `location` varchar(80) DEFAULT NULL COMMENT 'authorized value for the shelving location for this item (MARC21 952$c)',
3996
  `permanent_location` varchar(80) DEFAULT NULL COMMENT 'linked to the CART and PROC temporary locations feature, stores the permanent shelving location',
3997
  `permanent_location` varchar(80) DEFAULT NULL COMMENT 'linked to the CART and PROC temporary locations feature, stores the permanent shelving location',
3998
  `sub_location` varchar(80) DEFAULT NULL COMMENT 'authorized value for the sublocation for this item',
3997
  `onloan` date DEFAULT NULL COMMENT 'defines if item is checked out (NULL for not checked out, and due date for checked out)',
3999
  `onloan` date DEFAULT NULL COMMENT 'defines if item is checked out (NULL for not checked out, and due date for checked out)',
3998
  `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source used on this item (MARC21 952$2)',
4000
  `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source used on this item (MARC21 952$2)',
3999
  `cn_sort` varchar(255) DEFAULT NULL COMMENT 'normalized form of the call number (MARC21 952$o) used for sorting',
4001
  `cn_sort` varchar(255) DEFAULT NULL COMMENT 'normalized form of the call number (MARC21 952$o) used for sorting',
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (+6 lines)
Lines 436-441 Link Here
436
                            [% ELSE %]
436
                            [% ELSE %]
437
                                [% item_location | html %]
437
                                [% item_location | html %]
438
                            [% END %]
438
                            [% END %]
439
                            [% SET item_sublocation= AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.sub_location', authorised_value => item.sub_location ) %]
440
                            [% IF ( item_sublocation ) %]
441
                            <span class="sub_location">
442
                            ([% item_sublocation | html %])
443
                            </span>
444
                            [% END %]
439
                        </span>
445
                        </span>
440
                    </td>
446
                    </td>
441
                    [% IF ( itemdata_ccode ) %]<td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]</td>[% END %]
447
                    [% IF ( itemdata_ccode ) %]<td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]</td>[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt (+6 lines)
Lines 147-152 Link Here
147
                                                [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_DAT.location ) | html %]
147
                                                [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_DAT.location ) | html %]
148
                                            </li>
148
                                            </li>
149
                                        [% END %]
149
                                        [% END %]
150
                                        [% IF ( ITEM_DAT.sub_location ) %]
151
                                            <li>
152
                                                <span class="label">Sublocation:</span>
153
                                                [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.sub_location', authorised_value => ITEM_DAT.sub_location ) | html %]
154
                                            </li>
155
                                        [% END %]
150
                                        [% IF ( ITEM_DAT.replacementprice ) %]
156
                                        [% IF ( ITEM_DAT.replacementprice ) %]
151
                                            <li><span class="label">Replacement price:</span> [% ITEM_DAT.replacementprice | $Price %]&nbsp;</li>
157
                                            <li><span class="label">Replacement price:</span> [% ITEM_DAT.replacementprice | $Price %]&nbsp;</li>
152
                                        [% END %]
158
                                        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-2 / +1 lines)
Lines 1289-1295 Link Here
1289
                                                 [%- END -%]
1289
                                                 [%- END -%]
1290
                                            </td>
1290
                                            </td>
1291
                                            <td class="ci-shelvinglocation">
1291
                                            <td class="ci-shelvinglocation">
1292
                                                <span class="shelvingloc">[% riloo.location | html %]</span>
1292
                                                <span class="shelvingloc">[% riloo.location | html %] [% IF ( riloo.sub_location ) %] ([% riloo.sub_location | html %]) [% END %]</span>
1293
                                            </td>
1293
                                            </td>
1294
                                            <td class="ci-callnumber">
1294
                                            <td class="ci-callnumber">
1295
                                                [% riloo.itemcallnumber | html %]
1295
                                                [% riloo.itemcallnumber | html %]
1296
- 

Return to bug 34142