Bug 30728: Only trigger real-time holds queue update if enabled
This patch makes the places in which Koha enqueues holds queue for real time updates verify the feature is enabled. To test: 1. Apply this patches up to the unit tests 2. Run: $ updatedatabase $ kshell k$ git diff origin/master --name-only | grep -e '\.t$' | xargs prove => FAIL: tests fail, the code doesn't care about the syspref 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Be happy! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
b952519c26
commit
af1f8d34db
|
|
@ -347,7 +347,7 @@ us to not relink records when the authority linker is saving modifications.
|
|||
=item C<skip_holds_queue>
|
||||
|
||||
Unless C<skip_holds_queue> is passed, ModBiblio will trigger the BatchUpdateBiblioHoldsQueue
|
||||
task to rebuild the holds queue for the biblio.
|
||||
task to rebuild the holds queue for the biblio if I<RealTimeHoldsQueue> is enabled.
|
||||
|
||||
=back
|
||||
|
||||
|
|
@ -440,7 +440,7 @@ sub ModBiblio {
|
|||
{
|
||||
biblio_ids => [ $biblionumber ]
|
||||
}
|
||||
) unless $options->{skip_holds_queue};
|
||||
) unless $options->{skip_holds_queue} or !C4::Context->preference('RealTimeHoldsQueue');
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -547,7 +547,7 @@ sub DelBiblio {
|
|||
{
|
||||
biblio_ids => [ $biblionumber ]
|
||||
}
|
||||
) unless $params->{skip_holds_queue};
|
||||
) unless $params->{skip_holds_queue} or !C4::Context->preference('RealTimeHoldsQueue');
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1779,7 +1779,7 @@ sub AddIssue {
|
|||
{
|
||||
biblio_ids => [ $item_object->biblionumber ]
|
||||
}
|
||||
);
|
||||
) if C4::Context->preference('RealTimeHoldsQueue');
|
||||
}
|
||||
}
|
||||
return $issue;
|
||||
|
|
@ -2445,7 +2445,7 @@ sub AddReturn {
|
|||
{
|
||||
biblio_ids => [ $item->biblionumber ]
|
||||
}
|
||||
);
|
||||
) if C4::Context->preference('RealTimeHoldsQueue');
|
||||
}
|
||||
|
||||
return ( $doreturn, $messages, $issue, ( $patron ? $patron->unblessed : {} ));
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ sub AddReserve {
|
|||
{
|
||||
biblio_ids => [ $biblionumber ]
|
||||
}
|
||||
);
|
||||
) if C4::Context->preference('RealTimeHoldsQueue');
|
||||
|
||||
return $reserve_id;
|
||||
}
|
||||
|
|
@ -1446,7 +1446,7 @@ sub AlterPriority {
|
|||
{
|
||||
biblio_ids => [ $hold->biblionumber ]
|
||||
}
|
||||
);
|
||||
) if C4::Context->preference('RealTimeHoldsQueue');
|
||||
# FIXME Should return the new priority
|
||||
}
|
||||
|
||||
|
|
@ -2099,7 +2099,7 @@ sub RevertWaitingStatus {
|
|||
{
|
||||
biblio_ids => [ $hold->biblionumber ]
|
||||
}
|
||||
);
|
||||
) if C4::Context->preference('RealTimeHoldsQueue');
|
||||
|
||||
|
||||
return $hold;
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ sub process {
|
|||
{
|
||||
biblio_ids => \@deleted_biblionumbers
|
||||
}
|
||||
);
|
||||
) if C4::Context->preference('RealTimeHoldsQueue');
|
||||
}
|
||||
|
||||
my $job_data = decode_json $self->data;
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ sub process {
|
|||
{
|
||||
biblio_ids => \@deleted_biblionumbers
|
||||
}
|
||||
);
|
||||
) if C4::Context->preference('RealTimeHoldsQueue');
|
||||
}
|
||||
|
||||
if (@updated_biblionumbers) {
|
||||
|
|
@ -175,7 +175,7 @@ sub process {
|
|||
{
|
||||
biblio_ids => \@updated_biblionumbers
|
||||
}
|
||||
);
|
||||
) if C4::Context->preference('RealTimeHoldsQueue');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ sub suspend_hold {
|
|||
{
|
||||
biblio_ids => [ $self->biblionumber ]
|
||||
}
|
||||
);
|
||||
) if C4::Context->preference('RealTimeHoldsQueue');
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
|
@ -164,7 +164,7 @@ sub resume {
|
|||
{
|
||||
biblio_ids => [ $self->biblionumber ]
|
||||
}
|
||||
);
|
||||
) if C4::Context->preference('RealTimeHoldsQueue');
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
|
@ -627,7 +627,7 @@ sub cancel {
|
|||
{
|
||||
biblio_ids => [ $old_me->biblionumber ]
|
||||
}
|
||||
) unless $params->{skip_holds_queue};
|
||||
) unless $params->{skip_holds_queue} or !C4::Context->preference('RealTimeHoldsQueue');
|
||||
}
|
||||
);
|
||||
return $self;
|
||||
|
|
@ -697,7 +697,7 @@ sub fill {
|
|||
{
|
||||
biblio_ids => [ $old_me->biblionumber ]
|
||||
}
|
||||
);
|
||||
) if C4::Context->preference('RealTimeHoldsQueue');
|
||||
}
|
||||
);
|
||||
return $self;
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ sub store {
|
|||
{
|
||||
biblio_ids => [ $self->biblionumber ]
|
||||
}
|
||||
) unless $params->{skip_holds_queue};
|
||||
) unless $params->{skip_holds_queue} or !C4::Context->preference('RealTimeHoldsQueue');
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
|
@ -248,7 +248,7 @@ sub delete {
|
|||
{
|
||||
biblio_ids => [ $self->biblionumber ]
|
||||
}
|
||||
) unless $params->{skip_holds_queue};
|
||||
) unless $params->{skip_holds_queue} or !C4::Context->preference('RealTimeHoldsQueue');
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue