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

(-)a/Koha/Illrequest.pm (-8 / +8 lines)
Lines 183-189 sub statusalias { Link Here
183
    return Koha::AuthorisedValues->search(
183
    return Koha::AuthorisedValues->search(
184
        {
184
        {
185
            category         => 'ILL_STATUS_ALIAS',
185
            category         => 'ILL_STATUS_ALIAS',
186
            authorised_value => $self->SUPER::status_alias
186
            authorised_value => $self->get_column('status_alias'),
187
        },
187
        },
188
        {},
188
        {},
189
        $self->branchcode
189
        $self->branchcode
Lines 314-320 sub status_alias { Link Here
314
        # We need a way of accepting implied undef, so we can nullify
314
        # We need a way of accepting implied undef, so we can nullify
315
        # the status_alias column, when called from $self->status
315
        # the status_alias column, when called from $self->status
316
        my $val = $new_status_alias eq "-1" ? undef : $new_status_alias;
316
        my $val = $new_status_alias eq "-1" ? undef : $new_status_alias;
317
        my $ret = $self->SUPER::status_alias($val);
317
        my $ret = $self->set( { status_alias => $val } );
318
        my $val_to_log = $val ? $new_status_alias : scalar $self->status;
318
        my $val_to_log = $val ? $new_status_alias : scalar $self->status;
319
        if ($ret) {
319
        if ($ret) {
320
            my $logger = Koha::Illrequest::Logger->new;
320
            my $logger = Koha::Illrequest::Logger->new;
Lines 368-374 sub status { Link Here
368
        $self->{previous_status} = $current_status_alias ?
368
        $self->{previous_status} = $current_status_alias ?
369
            $current_status_alias :
369
            $current_status_alias :
370
            $current_status;
370
            $current_status;
371
        my $ret = $self->SUPER::status($new_status)->store;
371
        my $ret = $self->set( { status => $new_status } )->store;
372
        if ($current_status_alias) {
372
        if ($current_status_alias) {
373
            # This is hackery to enable us to undefine
373
            # This is hackery to enable us to undefine
374
            # status_alias, since we need to have an overloaded
374
            # status_alias, since we need to have an overloaded
Lines 1098-1107 Return a string representing the material type of this request or undef Link Here
1098
1098
1099
sub get_type {
1099
sub get_type {
1100
    my ($self) = @_;
1100
    my ($self) = @_;
1101
    my $attr = $self->illrequestattributes->find({ type => 'type'});
1101
    my $attr = $self->extended_attributes->find( { type => 'type' } );
1102
    return if !$attr;
1102
    return if !$attr;
1103
    return $attr->value;
1103
    return $attr->value;
1104
};
1104
}
1105
1105
1106
#### Illrequests Imports
1106
#### Illrequests Imports
1107
1107
Lines 1704-1713 and transport type Link Here
1704
sub get_notice {
1704
sub get_notice {
1705
    my ( $self, $params ) = @_;
1705
    my ( $self, $params ) = @_;
1706
1706
1707
    my $title = $self->illrequestattributes->find(
1707
    my $title = $self->extended_attributes->find(
1708
        { type => 'title' }
1708
        { type => 'title' }
1709
    );
1709
    );
1710
    my $author = $self->illrequestattributes->find(
1710
    my $author = $self->extended_attributes->find(
1711
        { type => 'author' }
1711
        { type => 'author' }
1712
    );
1712
    );
1713
    my $metahash = $self->metadata;
1713
    my $metahash = $self->metadata;
Lines 1719-1725 sub get_notice { Link Here
1719
    my $metastring = join("\n", @metaarray);
1719
    my $metastring = join("\n", @metaarray);
1720
1720
1721
    my $illrequestattributes = {
1721
    my $illrequestattributes = {
1722
        map { $_->type => $_->value } $self->illrequestattributes->as_list
1722
        map { $_->type => $_->value } $self->extended_attributes->as_list
1723
    };
1723
    };
1724
1724
1725
    my $letter = C4::Letters::GetPreparedLetter(
1725
    my $letter = C4::Letters::GetPreparedLetter(
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-2 / +1 lines)
Lines 729-735 Link Here
729
                                </div>
729
                                </div>
730
                                <div class="modal-body">
730
                                <div class="modal-body">
731
                                    <div id="requestattributes">
731
                                    <div id="requestattributes">
732
                                        [% FOREACH attr IN request.illrequestattributes %]
732
                                        [% FOREACH attr IN request.extended_attributes %]
733
                                        <div class="requestattr-[% attr.type | html %]">
733
                                        <div class="requestattr-[% attr.type | html %]">
734
                                            <span class="label">[% attr.type | html %]:</span>
734
                                            <span class="label">[% attr.type | html %]:</span>
735
                                            [% attr.value | html %]
735
                                            [% attr.value | html %]
736
- 

Return to bug 34838