From 53b3ebe9d0b359ac88671ed489afc49ab65d2520 Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Fri, 17 May 2019 21:38:37 -0300 Subject: [PATCH] Bug 14570: (follow-up) fix qa FAIL tests Signed-off-by: Agustin Moyano Signed-off-by: Liz Rea Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize --- Koha/Patron/Relationships.pm | 6 ++++-- Koha/Patrons.pm | 4 ++++ .../prog/en/modules/circ/circulation.tt | 2 +- .../prog/en/modules/members/memberentrygen.tt | 14 +++++++------- .../prog/en/modules/members/moremember-brief.tt | 2 +- members/memberentry.pl | 3 ++- t/db_dependent/Items.t | 2 +- 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/Koha/Patron/Relationships.pm b/Koha/Patron/Relationships.pm index 0cdfa9fb09..db3b107def 100644 --- a/Koha/Patron/Relationships.pm +++ b/Koha/Patron/Relationships.pm @@ -82,8 +82,6 @@ sub guarantees { return wantarray ? $guarantees->as_list : $guarantees; } -=cut - =head3 type =cut @@ -92,6 +90,10 @@ sub _type { return 'BorrowerRelationship'; } +=head3 object_class + +=cut + sub object_class { return 'Koha::Patron::Relationship'; } diff --git a/Koha/Patrons.pm b/Koha/Patrons.pm index 80537197b8..4a5f63c1e4 100644 --- a/Koha/Patrons.pm +++ b/Koha/Patrons.pm @@ -368,6 +368,10 @@ sub _type { return 'Borrower'; } +=head3 object_class + +=cut + sub object_class { return 'Koha::Patron'; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 3c41a25fcd..5fb4889bed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -824,7 +824,7 @@ [% IF relatives_issues_count %] -
  • [% relatives_issues_count %] Relatives' checkouts
  • +
  • [% relatives_issues_count | html %] Relatives' checkouts
  • [% END %]
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index ec200302ff..bdb7bf89f2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -470,23 +470,23 @@
  • [% END %] - [% UNLESS norelationship %] - [% IF possible_relationships %] + [% UNLESS norelationship %] + [% IF possible_relationships %]
  • - [% END %] - [% END %] + [% END %] + [% END %] [% UNLESS nophone %]
  • @@ -1231,7 +1231,7 @@ [% END %] [% IF guarantor %] - select_user( '[% guarantor.borrowernumber %]', [% To.json( guarantor.unblessed ) | $raw %] ); + select_user( '[% guarantor.borrowernumber | html %]', [% To.json( guarantor.unblessed ) | $raw %] ); [% END %] $("#cn_max").hide(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt index 5170914ffc..1c3b2c3b1b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt @@ -60,7 +60,7 @@
  • [% END %] [% END %] - + diff --git a/members/memberentry.pl b/members/memberentry.pl index 9aa1462186..fbf2866b26 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -108,7 +108,8 @@ my $userenv = C4::Context->userenv; $template->param( relationships => scalar $patron->guarantor_relationships ) if $patron; my $guarantor_id = $input->param('guarantor_id'); -my $guarantor = Koha::Patrons->find( $guarantor_id ) if $guarantor_id; +my $guarantor = undef; +$guarantor = Koha::Patrons->find( $guarantor_id ) if $guarantor_id; $template->param( guarantor => $guarantor ); my @delete_guarantor = $input->multi_param('delete_guarantor'); diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t index 01308245d2..8570eb0d25 100755 --- a/t/db_dependent/Items.t +++ b/t/db_dependent/Items.t @@ -589,7 +589,7 @@ subtest 'Koha::Item(s) tests' => sub { is( ref($holdingbranch), 'Koha::Library', "Got Koha::Library from holding_branch method" ); is( $holdingbranch->branchcode(), $library2->{branchcode}, "Home branch code matches holdingbranch" ); - my $biblio = $item->biblio(); + $biblio = $item->biblio(); is( ref($biblio), 'Koha::Biblio', "Got Koha::Biblio from biblio method" ); is( $biblio->title(), 'Silence in the library', 'Title matches biblio title' ); -- 2.39.5