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

(-)a/Koha/Database/Columns.pm (+1 lines)
Lines 239-244 sub columns { Link Here
239
            "restricted"                        => __("Use restrictions"),
239
            "restricted"                        => __("Use restrictions"),
240
            "stack"                             => __("Shelving control number"),
240
            "stack"                             => __("Shelving control number"),
241
            "stocknumber"                       => __("Inventory number"),
241
            "stocknumber"                       => __("Inventory number"),
242
            "sub_location"                      => __("Sublocation"),
242
            "timestamp"                         => __("Timestamp"),
243
            "timestamp"                         => __("Timestamp"),
243
            "uri"                               => __("Uniform resource identifier"),
244
            "uri"                               => __("Uniform resource identifier"),
244
            "withdrawn_on"                      => __("Withdrawn on"),
245
            "withdrawn_on"                      => __("Withdrawn on"),
(-)a/Koha/Item.pm (+1 lines)
Lines 1501-1506 sub to_api_mapping { Link Here
1501
        stocknumber              => 'inventory_number',
1501
        stocknumber              => 'inventory_number',
1502
        new_status               => 'new_status',
1502
        new_status               => 'new_status',
1503
        deleted_on               => undef,
1503
        deleted_on               => undef,
1504
        sub_location             => 'sub_location'
1504
    };
1505
    };
1505
}
1506
}
1506
1507
(-)a/api/v1/swagger/definitions/item.yaml (+5 lines)
Lines 217-222 properties: Link Here
217
      - string
217
      - string
218
      - "null"
218
      - "null"
219
    description: "'new' value, whatever free-text information."
219
    description: "'new' value, whatever free-text information."
220
  sub_location:
221
    type:
222
      - string
223
      - "null"
224
    description: sub_location for this item
220
  exclude_from_local_holds_priority:
225
  exclude_from_local_holds_priority:
221
    type: boolean
226
    type: boolean
222
    description: Exclude this item from local holds priority.
227
    description: Exclude this item from local holds priority.
(-)a/circ/returns.pl (-1 / +3 lines)
Lines 762-767 my $count = 0; Link Here
762
my @riloop;
762
my @riloop;
763
my $shelflocations =
763
my $shelflocations =
764
  { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' } ) };
764
  { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' } ) };
765
my $sublocation =
766
  { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.sub_location' } ) };
765
foreach ( sort { $a <=> $b } keys %returneditems ) {
767
foreach ( sort { $a <=> $b } keys %returneditems ) {
766
    my %ri;
768
    my %ri;
767
    if ( $count++ < $returned_counter ) {
769
    if ( $count++ < $returned_counter ) {
Lines 816-822 foreach ( sort { $a <=> $b } keys %returneditems ) { Link Here
816
        $ri{location} = $item->location;
818
        $ri{location} = $item->location;
817
        my $shelfcode = $ri{'location'};
819
        my $shelfcode = $ri{'location'};
818
        $ri{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
820
        $ri{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
819
821
        $ri{sub_location} = $sublocation->{$item->sub_location} if ( defined( $item->sub_location ) && defined($sublocation) && exists( $sublocation->{$item->sub_location} ) );
820
    }
822
    }
821
    else {
823
    else {
822
        last;
824
        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(10) 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(10) 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 2716-2721 CREATE TABLE `deleteditems` ( Link Here
2716
  `deleted_on` datetime DEFAULT NULL COMMENT 'date/time of deletion',
2716
  `deleted_on` datetime DEFAULT NULL COMMENT 'date/time of deletion',
2717
  `location` varchar(80) DEFAULT NULL COMMENT 'authorized value for the shelving location for this item (MARC21 952$c)',
2717
  `location` varchar(80) DEFAULT NULL COMMENT 'authorized value for the shelving location for this item (MARC21 952$c)',
2718
  `permanent_location` varchar(80) DEFAULT NULL COMMENT 'linked to the CART and PROC temporary locations feature, stores the permanent shelving location',
2718
  `permanent_location` varchar(80) DEFAULT NULL COMMENT 'linked to the CART and PROC temporary locations feature, stores the permanent shelving location',
2719
  `sub_location` varchar(10) DEFAULT NULL COMMENT 'authorized value for the sublocation for this item',
2719
  `onloan` date DEFAULT NULL COMMENT 'defines if item is checked out (NULL for not checked out, and due date for checked out)',
2720
  `onloan` date DEFAULT NULL COMMENT 'defines if item is checked out (NULL for not checked out, and due date for checked out)',
2720
  `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source used on this item (MARC21 952$2)',
2721
  `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source used on this item (MARC21 952$2)',
2721
  `cn_sort` varchar(255) DEFAULT NULL COMMENT 'normalized form of the call number (MARC21 952$o) used for sorting',
2722
  `cn_sort` varchar(255) DEFAULT NULL COMMENT 'normalized form of the call number (MARC21 952$o) used for sorting',
Lines 3688-3693 CREATE TABLE `items` ( Link Here
3688
  `deleted_on` datetime DEFAULT NULL COMMENT 'date/time of deletion',
3689
  `deleted_on` datetime DEFAULT NULL COMMENT 'date/time of deletion',
3689
  `location` varchar(80) DEFAULT NULL COMMENT 'authorized value for the shelving location for this item (MARC21 952$c)',
3690
  `location` varchar(80) DEFAULT NULL COMMENT 'authorized value for the shelving location for this item (MARC21 952$c)',
3690
  `permanent_location` varchar(80) DEFAULT NULL COMMENT 'linked to the CART and PROC temporary locations feature, stores the permanent shelving location',
3691
  `permanent_location` varchar(80) DEFAULT NULL COMMENT 'linked to the CART and PROC temporary locations feature, stores the permanent shelving location',
3692
  `sub_location` varchar(10) DEFAULT NULL COMMENT 'authorized value for the sublocation for this item',
3691
  `onloan` date DEFAULT NULL COMMENT 'defines if item is checked out (NULL for not checked out, and due date for checked out)',
3693
  `onloan` date DEFAULT NULL COMMENT 'defines if item is checked out (NULL for not checked out, and due date for checked out)',
3692
  `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source used on this item (MARC21 952$2)',
3694
  `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source used on this item (MARC21 952$2)',
3693
  `cn_sort` varchar(255) DEFAULT NULL COMMENT 'normalized form of the call number (MARC21 952$o) used for sorting',
3695
  `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 434-439 Link Here
434
                            [% ELSE %]
434
                            [% ELSE %]
435
                                [% item_location | html %]
435
                                [% item_location | html %]
436
                            [% END %]
436
                            [% END %]
437
                            [% SET item_sublocation= AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.sub_location', authorised_value => item.sub_location ) %]
438
                            [% IF ( item_sublocation ) %]
439
                            <span class="sub_location">
440
                            ([% item.sub_location | html %])
441
                            </span>
442
                            [% END %]
437
                        </span>
443
                        </span>
438
                    </td>
444
                    </td>
439
                    [% IF ( itemdata_ccode ) %]<td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]</td>[% END %]
445
                    [% IF ( itemdata_ccode ) %]<td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]</td>[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-2 / +1 lines)
Lines 1256-1262 Link Here
1256
                                                [% Branches.GetName( riloo.transferbranch ) | html %]
1256
                                                [% Branches.GetName( riloo.transferbranch ) | html %]
1257
                                            </td>
1257
                                            </td>
1258
                                            <td class="ci-shelvinglocation">
1258
                                            <td class="ci-shelvinglocation">
1259
                                                <span class="shelvingloc">[% riloo.location | html %]</span>
1259
                                                <span class="shelvingloc">[% riloo.location | html %] [% IF ( riloo.sub_location ) %] ([% riloo.sub_location | html %]) [% END %]</span>
1260
                                            </td>
1260
                                            </td>
1261
                                            <td class="ci-callnumber">
1261
                                            <td class="ci-callnumber">
1262
                                                [% riloo.itemcallnumber | html %]
1262
                                                [% riloo.itemcallnumber | html %]
1263
- 

Return to bug 34142