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

(-)a/Koha/Illrequest.pm (+17 lines)
Lines 710-715 sub mark_completed { Link Here
710
    };
710
    };
711
}
711
}
712
712
713
=head2 backend_illview
714
715
View and manage an ILL request
716
717
=cut
718
719
sub backend_illview {
720
    my ( $self, $params ) = @_;
721
722
    my $response = $self->_backend_capability('illview',{
723
            request    => $self,
724
            other      => $params,
725
        });
726
    return $self->expandTemplate($response) if $response;
727
    return $response;
728
}
729
713
=head2 backend_migrate
730
=head2 backend_migrate
714
731
715
Migrate a request from one backend to another.
732
Migrate a request from one backend to another.
(-)a/ill/ill-requests.pl (+6 lines)
Lines 97-102 if ( $backends_available ) { Link Here
97
                ( tran_success => $params->{tran_success} ) : () ),
97
                ( tran_success => $params->{tran_success} ) : () ),
98
        );
98
        );
99
99
100
        my $backend_result = $request->backend_illview($params);
101
        $template->param(
102
            whole      => $backend_result,
103
        ) if $backend_result;
104
105
100
    } elsif ( $op eq 'create' ) {
106
    } elsif ( $op eq 'create' ) {
101
        # We're in the process of creating a request
107
        # We're in the process of creating a request
102
        my $request = Koha::Illrequest->new->load_backend( $params->{backend} );
108
        my $request = Koha::Illrequest->new->load_backend( $params->{backend} );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (+1 lines)
Lines 484-489 Link Here
484
                    </div>
484
                    </div>
485
485
486
                [% ELSIF query_type == 'illview' %]
486
                [% ELSIF query_type == 'illview' %]
487
                    [% PROCESS $whole.template %]
487
                    [% req_status = request.status %]
488
                    [% req_status = request.status %]
488
489
489
                    [% IF error %]
490
                    [% IF error %]
(-)a/t/db_dependent/Illrequests.t (-2 / +6 lines)
Lines 517-523 subtest 'Backend testing (mocks)' => sub { Link Here
517
517
518
subtest 'Backend core methods' => sub {
518
subtest 'Backend core methods' => sub {
519
519
520
    plan tests => 18;
520
    plan tests => 19;
521
521
522
    $schema->storage->txn_begin;
522
    $schema->storage->txn_begin;
523
523
Lines 655-660 subtest 'Backend core methods' => sub { Link Here
655
              },
655
              },
656
              "Backend cancel: arbitrary stage.");
656
              "Backend cancel: arbitrary stage.");
657
657
658
    # backend_illview
659
    $backend->set_series('illview', { stage => '', method => 'illview' });
660
    is_deeply($illrq->backend_illview({test => 1}), 0,
661
              "Backend illview optional method.");
662
658
    # backend_update_status
663
    # backend_update_status
659
    $backend->set_series('update_status', { stage => 'bar', method => 'update_status' });
664
    $backend->set_series('update_status', { stage => 'bar', method => 'update_status' });
660
    is_deeply($illrq->backend_update_status({test => 1}),
665
    is_deeply($illrq->backend_update_status({test => 1}),
661
- 

Return to bug 28909