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

(-)a/Koha/Illrequest.pm (-4 / +4 lines)
Lines 158-168 sub statusalias { Link Here
158
    my ( $self ) = @_;
158
    my ( $self ) = @_;
159
    return unless $self->status_alias;
159
    return unless $self->status_alias;
160
    # We can't know which result is the right one if there are multiple
160
    # We can't know which result is the right one if there are multiple
161
    # ILLSTATUS authorised values with the same authorised_value column value
161
    # ILL_STATUS_ALIAS authorised values with the same authorised_value column value
162
    # so we just use the first
162
    # so we just use the first
163
    return Koha::AuthorisedValues->search(
163
    return Koha::AuthorisedValues->search(
164
        {
164
        {
165
            category         => 'ILLSTATUS',
165
            category         => 'ILL_STATUS_ALIAS',
166
            authorised_value => $self->SUPER::status_alias
166
            authorised_value => $self->SUPER::status_alias
167
        },
167
        },
168
        {},
168
        {},
Lines 256-266 sub status_alias { Link Here
256
        return $ret;
256
        return $ret;
257
    }
257
    }
258
    # We can't know which result is the right one if there are multiple
258
    # We can't know which result is the right one if there are multiple
259
    # ILLSTATUS authorised values with the same authorised_value column value
259
    # ILL_STATUS_ALIAS authorised values with the same authorised_value column value
260
    # so we just use the first
260
    # so we just use the first
261
    my $alias = Koha::AuthorisedValues->search(
261
    my $alias = Koha::AuthorisedValues->search(
262
        {
262
        {
263
            category         => 'ILLSTATUS',
263
            category         => 'ILL_STATUS_ALIAS',
264
            authorised_value => $self->SUPER::status_alias
264
            authorised_value => $self->SUPER::status_alias
265
        },
265
        },
266
        {},
266
        {},
(-)a/Koha/Illrequest/Logger.pm (-1 / +1 lines)
Lines 252-258 sub get_request_logs { Link Here
252
        $notice_hash->{$notice->{code}} = $notice;
252
        $notice_hash->{$notice->{code}} = $notice;
253
    }
253
    }
254
    # Populate a lookup table for status aliases
254
    # Populate a lookup table for status aliases
255
    my $aliases = C4::Koha::GetAuthorisedValues('ILLSTATUS');
255
    my $aliases = C4::Koha::GetAuthorisedValues('ILL_STATUS_ALIAS');
256
    my $alias_hash;
256
    my $alias_hash;
257
    foreach my $alias(@{$aliases}) {
257
    foreach my $alias(@{$aliases}) {
258
        $alias_hash->{$alias->{authorised_value}} = $alias;
258
        $alias_hash->{$alias->{authorised_value}} = $alias;
(-)a/installer/data/mysql/atomicupdate/bug_32799_ill_status_alias.pl (+14 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "32799",
5
    description => "Rename ILLSTATUS authorised value category",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Do you stuffs here
10
        $dbh->do(q{UPDATE authorised_value_categories SET category_name = "ILL_STATUS_ALIAS" WHERE category_name = "ILLSTATUS"});
11
        # Print useful stuff here
12
        say $out "Renamed authorised value category 'ILLSTATUS' to 'ILL_STATUS_ALIAS'";;
13
    },
14
};
(-)a/installer/data/mysql/mandatory/auth_val_cat.sql (-1 / +1 lines)
Lines 63-69 INSERT IGNORE INTO authorised_value_categories( category_name ) VALUES Link Here
63
63
64
-- For Interlibrary loans
64
-- For Interlibrary loans
65
INSERT IGNORE INTO authorised_value_categories( category_name ) VALUES
65
INSERT IGNORE INTO authorised_value_categories( category_name ) VALUES
66
    ('ILLSTATUS');
66
    ('ILL_STATUS_ALIAS');
67
67
68
-- For Claims returned
68
-- For Claims returned
69
INSERT IGNORE INTO authorised_value_categories( category_name ) VALUES
69
INSERT IGNORE INTO authorised_value_categories( category_name ) VALUES
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt (+2 lines)
Lines 535-540 Link Here
535
            <p>General holdings: type of unit designator</p>
535
            <p>General holdings: type of unit designator</p>
536
        [% CASE 'HOLD_CANCELLATION' %]
536
        [% CASE 'HOLD_CANCELLATION' %]
537
            <p>Reasons why a hold might have been cancelled</p>
537
            <p>Reasons why a hold might have been cancelled</p>
538
        [% CASE 'ILL_STATUS_ALIAS' %]
539
            <p>ILL request status aliases used by the interlibrary loans module</p>
538
        [% CASE 'AR_CANCELLATION' %]
540
        [% CASE 'AR_CANCELLATION' %]
539
            <p>Reasons why an article request might have been cancelled</p>
541
            <p>Reasons why an article request might have been cancelled</p>
540
        [% CASE 'HSBND_FREQ' %]
542
        [% CASE 'HSBND_FREQ' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/interlibrary_loans.pref (-1 / +1 lines)
Lines 37-43 Interlibrary loans: Link Here
37
            - "ILL statuses that are considered finished and should not be displayed in the ILL module: "
37
            - "ILL statuses that are considered finished and should not be displayed in the ILL module: "
38
            - pref: ILLHiddenRequestStatuses
38
            - pref: ILLHiddenRequestStatuses
39
              class: multi
39
              class: multi
40
            - (separated with |). If left empty, all ILL requests will be displayed. The request codes can be found in the <a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=ILLSTATUS">ILLSTATUS</a> authorized value category.
40
            - (separated with |). If left empty, all ILL requests will be displayed. The request codes are defined in the backends and additional aliases can be configured via the <a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=ILL_STATUS_ALIAS">ILL_STATUS_ALIAS</a> authorized value category.
41
    Notifications:
41
    Notifications:
42
        -
42
        -
43
            - "Send these ILL notices to staff when appropriate:"
43
            - "Send these ILL notices to staff when appropriate:"
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-1 / +1 lines)
Lines 422-428 Link Here
422
                                        [% END %]
422
                                        [% END %]
423
                                            [% request.capabilities.$stat.name | html %]
423
                                            [% request.capabilities.$stat.name | html %]
424
                                        </option>
424
                                        </option>
425
                                        [% FOREACH alias IN AuthorisedValues.Get('ILLSTATUS') %]
425
                                        [% FOREACH alias IN AuthorisedValues.Get('ILL_STATUS_ALIAS') %]
426
                                            [% IF alias.authorised_value == current_alias %]
426
                                            [% IF alias.authorised_value == current_alias %]
427
                                            <option value="[% alias.authorised_value | html %]" selected>
427
                                            <option value="[% alias.authorised_value | html %]" selected>
428
                                            [% ELSE %]
428
                                            [% ELSE %]
(-)a/t/db_dependent/Illrequests.t (-5 / +4 lines)
Lines 1517-1523 subtest 'Custom statuses' => sub { Link Here
1517
1517
1518
    my $cat = Koha::AuthorisedValueCategories->search(
1518
    my $cat = Koha::AuthorisedValueCategories->search(
1519
        {
1519
        {
1520
            category_name => 'ILLSTATUS'
1520
            category_name => 'ILL_STATUS_ALIAS'
1521
        }
1521
        }
1522
    );
1522
    );
1523
1523
Lines 1526-1532 subtest 'Custom statuses' => sub { Link Here
1526
            {
1526
            {
1527
                class => 'Koha::AuthorisedValueCategory',
1527
                class => 'Koha::AuthorisedValueCategory',
1528
                value => {
1528
                value => {
1529
                    category_name => 'ILLSTATUS'
1529
                    category_name => 'ILL_STATUS_ALIAS'
1530
                }
1530
                }
1531
            }
1531
            }
1532
        );
1532
        );
Lines 1536-1547 subtest 'Custom statuses' => sub { Link Here
1536
        {
1536
        {
1537
            class => 'Koha::AuthorisedValues',
1537
            class => 'Koha::AuthorisedValues',
1538
            value => {
1538
            value => {
1539
                category => 'ILLSTATUS'
1539
                category => 'ILL_STATUS_ALIAS'
1540
            }
1540
            }
1541
        }
1541
        }
1542
    );
1542
    );
1543
1543
1544
    is($av->category, 'ILLSTATUS',
1544
    is($av->category, 'ILL_STATUS_ALIAS',
1545
       "Successfully created authorised value for custom status");
1545
       "Successfully created authorised value for custom status");
1546
1546
1547
    my $ill_req = $builder->build_object(
1547
    my $ill_req = $builder->build_object(
1548
- 

Return to bug 32799