Bug 19532: (follow-up) Fixing tests and QA tools
And making reverted ajax message clearer Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
b5d1736295
commit
4d6c7cdb1a
|
|
@ -183,7 +183,7 @@ sub move_recall {
|
|||
|
||||
if ( $message eq 'no action provided' and $item and $item->biblionumber and $borrowernumber ) {
|
||||
# move_recall was not called to revert or cancel, but was called to fulfill
|
||||
my $recall = Koha::Recalls->find({ borrowernumber => $borrowernumber, biblionumber => $item->biblionumber, itemnumber => [ $item->itemnumber, undef ], old => undef });
|
||||
my $recall = Koha::Recalls->search({ borrowernumber => $borrowernumber, biblionumber => $item->biblionumber, itemnumber => [ $item->itemnumber, undef ], old => undef }, { order_by => { -asc => 'recalldate' } })->next;
|
||||
if ( $recall ) {
|
||||
$recall->set_finished;
|
||||
$message = 'fulfilled';
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ $(document).ready(function() {
|
|||
if(data.success == 0) {
|
||||
message = __("The recall waiting status may have already been reverted. Please refresh the page.");
|
||||
} else {
|
||||
message = __("Status updated");
|
||||
message = __("Waiting status reverted");
|
||||
}
|
||||
$self.parent().parent().parent().parent().html(message);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ use C4::Auth qw( get_template_and_user );
|
|||
use C4::Output qw( output_html_with_http_headers );
|
||||
use C4::Context;
|
||||
|
||||
my $query = new CGI;
|
||||
my $query = CGI->new;
|
||||
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "opac-recall.tt",
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ use C4::Auth qw( get_template_and_user );
|
|||
use C4::Output qw( output_html_with_http_headers );
|
||||
use Koha::Recalls;
|
||||
|
||||
my $input = new CGI;
|
||||
my $input = CGI->new;
|
||||
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "opac-recalls.tt",
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ use C4::Context;
|
|||
use C4::Output qw( output_html_with_http_headers );
|
||||
use C4::Auth qw( get_template_and_user );
|
||||
|
||||
my $input = new CGI;
|
||||
my $input = CGI->new;
|
||||
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use C4::Auth qw( get_template_and_user );
|
|||
use C4::Output qw( output_html_with_http_headers );
|
||||
use Koha::BiblioFrameworks;
|
||||
|
||||
my $query = new CGI;
|
||||
my $query = CGI->new;
|
||||
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
|
||||
{
|
||||
template_name => "recalls/recalls_old_queue.tt",
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ use C4::Output qw( output_html_with_http_headers );
|
|||
use Koha::BiblioFrameworks;
|
||||
use Koha::DateUtils;
|
||||
|
||||
my $query = new CGI;
|
||||
my $query = CGI->new;
|
||||
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
|
||||
{
|
||||
template_name => "recalls/recalls_overdue.tt",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use C4::Auth qw( get_template_and_user );
|
|||
use C4::Output qw( output_html_with_http_headers );
|
||||
use Koha::BiblioFrameworks;
|
||||
|
||||
my $query = new CGI;
|
||||
my $query = CGI->new;
|
||||
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
|
||||
{
|
||||
template_name => "recalls/recalls_queue.tt",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use C4::Auth qw( get_template_and_user );
|
|||
use C4::Output qw( output_html_with_http_headers );
|
||||
use Koha::BiblioFrameworks;
|
||||
|
||||
my $query = new CGI;
|
||||
my $query = CGI->new;
|
||||
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
|
||||
{
|
||||
template_name => "recalls/recalls_to_pull.tt",
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use Koha::BiblioFrameworks;
|
|||
use Koha::DateUtils;
|
||||
use Koha::Patrons;
|
||||
|
||||
my $query = new CGI;
|
||||
my $query = CGI->new;
|
||||
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
|
||||
{
|
||||
template_name => "recalls/recalls_waiting.tt",
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ use C4::Output qw(output_with_http_headers);
|
|||
use C4::Circulation qw(AddReturn);
|
||||
use Koha::Recalls;
|
||||
|
||||
my $input = new CGI;
|
||||
my $input = CGI->new;
|
||||
my $json = encode_json({ success => 0 });
|
||||
|
||||
my ( $auth_status, $sessionID ) = check_cookie_auth( $input->cookie('CGISESSID'), { recall => 'manage_recalls' } );
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ my $item1 = $builder->build_sample_item();
|
|||
my $biblio1 = $item1->biblio;
|
||||
my $branch1 = $item1->holdingbranch;
|
||||
my $itemtype1 = $item1->effective_itemtype;
|
||||
my $item2 = $builder->build_sample_item();
|
||||
my $item2 = $builder->build_sample_item({ biblionumber => $biblio1->biblionumber });
|
||||
my $biblio2 = $item1->biblio;
|
||||
my $branch2 = $item1->holdingbranch;
|
||||
my $itemtype2 = $item1->effective_itemtype;
|
||||
|
|
@ -168,7 +168,7 @@ ok( $recall->cancelled, "Recall cancelled with move_recall" );
|
|||
expirationdate => undef,
|
||||
interface => 'COMMANDLINE',
|
||||
});
|
||||
$message = Koha::Recalls->move_recall({ recall_id => $recall->recall_id, itemnumber => $item2->itemnumber, borrowernumber => $patron1->borrowernumber });
|
||||
$message = Koha::Recalls->move_recall({ recall_id => $recall->recall_id, item => $item2, borrowernumber => $patron1->borrowernumber });
|
||||
$recall = Koha::Recalls->find( $recall->recall_id );
|
||||
ok( $recall->finished, "Recall fulfilled with move_recall" );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue