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

(-)a/Koha/Hold.pm (+1 lines)
Lines 848-853 sub fill { Link Here
848
                {
848
                {
849
                    found    => 'F',
849
                    found    => 'F',
850
                    priority => 0,
850
                    priority => 0,
851
                    timestamp => dt_from_string->strftime( '%Y-%m-%d %H:%M:%S' ),
851
                    $params->{item_id} ? ( itemnumber => $params->{item_id} ) : (),
852
                    $params->{item_id} ? ( itemnumber => $params->{item_id} ) : (),
852
                }
853
                }
853
            );
854
            );
(-)a/t/db_dependent/Koha/Hold.t (-3 / +4 lines)
Lines 106-112 subtest 'pickup_library/branch tests' => sub { Link Here
106
106
107
subtest 'fill() tests' => sub {
107
subtest 'fill() tests' => sub {
108
108
109
    plan tests => 14;
109
    plan tests => 15;
110
110
111
    $schema->storage->txn_begin;
111
    $schema->storage->txn_begin;
112
112
Lines 136-141 subtest 'fill() tests' => sub { Link Here
136
                biblionumber   => $biblio->id,
136
                biblionumber   => $biblio->id,
137
                borrowernumber => $patron->id,
137
                borrowernumber => $patron->id,
138
                itemnumber     => $item->id,
138
                itemnumber     => $item->id,
139
                timestamp      => dt_from_string('2021-06-25 14:05:35'),
139
                priority       => 10,
140
                priority       => 10,
140
            }
141
            }
141
        }
142
        }
Lines 148-154 subtest 'fill() tests' => sub { Link Here
148
149
149
    my $interface = 'api';
150
    my $interface = 'api';
150
    C4::Context->interface($interface);
151
    C4::Context->interface($interface);
151
152
    my $hold_timestamp = $hold->timestamp;
152
    my $ret = $hold->fill;
153
    my $ret = $hold->fill;
153
154
154
    is( ref($ret), 'Koha::Hold', '->fill returns the object type' );
155
    is( ref($ret), 'Koha::Hold', '->fill returns the object type' );
Lines 159-164 subtest 'fill() tests' => sub { Link Here
159
160
160
    is( $old_hold->id, $hold->id, 'reserve_id retained' );
161
    is( $old_hold->id, $hold->id, 'reserve_id retained' );
161
    is( $old_hold->priority, 0, 'priority set to 0' );
162
    is( $old_hold->priority, 0, 'priority set to 0' );
163
    isnt( $old_hold->timestamp, $hold_timestamp, 'timestamp updated' );
162
    is( $old_hold->found, 'F', 'found set to F' );
164
    is( $old_hold->found, 'F', 'found set to F' );
163
165
164
    subtest 'item_id parameter' => sub {
166
    subtest 'item_id parameter' => sub {
165
- 

Return to bug 37023