Bugzilla – Attachment 152215 Details for
Bug 33960
Add ability to retrieve deleted bibliographic records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33960: (QA follow-up) ->delete doesn't send to deletedbiblio
Bug-33960-QA-follow-up--delete-doesnt-send-to-dele.patch (text/plain), 2.15 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-06-08 18:28:33 UTC
(
hide
)
Description:
Bug 33960: (QA follow-up) ->delete doesn't send to deletedbiblio
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-06-08 18:28:33 UTC
Size:
2.15 KB
patch
obsolete
>From 9406277b8b9c7b65e0bd718fcab71b1e0750b4ed Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 8 Jun 2023 15:27:35 -0300 >Subject: [PATCH] Bug 33960: (QA follow-up) ->delete doesn't send to > deletedbiblio > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/REST/V1/Biblios.pm | 10 ++++++---- > t/db_dependent/api/v1/biblios.t | 5 +++-- > 2 files changed, 9 insertions(+), 6 deletions(-) > >diff --git a/Koha/REST/V1/Biblios.pm b/Koha/REST/V1/Biblios.pm >index 5aa09093b82..6ade31b7689 100644 >--- a/Koha/REST/V1/Biblios.pm >+++ b/Koha/REST/V1/Biblios.pm >@@ -798,16 +798,18 @@ Controller function that handles retrieving a single biblio object > sub list { > my $c = shift->openapi->valid_input or return; > >- my $deleted = delete $c->validation->output->{deleted}; >+ my $deleted = $c->param('deleted'); >+ $c->req->params->remove('deleted'); > > my $attributes; > $attributes = > { prefetch => ['metadata'] } # don't prefetch metadata if not needed > unless $c->req->headers->accept =~ m/application\/json/; > >- my $biblios = $deleted ? >- $c->objects->search_rs( Koha::Old::Biblios->new ) : >- $c->objects->search_rs( Koha::Biblios->new ); >+ my $biblios = >+ $deleted >+ ? $c->objects->search_rs( Koha::Old::Biblios->new ) >+ : $c->objects->search_rs( Koha::Biblios->new ); > > return try { > >diff --git a/t/db_dependent/api/v1/biblios.t b/t/db_dependent/api/v1/biblios.t >index 10f65a857a5..af830ee44df 100755 >--- a/t/db_dependent/api/v1/biblios.t >+++ b/t/db_dependent/api/v1/biblios.t >@@ -29,6 +29,7 @@ use t::lib::Mocks; > use t::lib::TestBuilder; > > use C4::Auth; >+use C4::Biblio qw( DelBiblio ); > use C4::Circulation qw( AddIssue AddReturn ); > > use Koha::Biblios; >@@ -1687,8 +1688,8 @@ subtest 'list() tests' => sub { > { Accept => 'text/plain', 'x-koha-query' => $search } ) > ->status_is(200); > >- $biblio->delete; >- $biblio2->delete; >+ DelBiblio( $biblio->id ); >+ DelBiblio( $biblio2->id ); > > $t->get_ok( "//$userid:$password@/api/v1/biblios/?deleted=1" => > { Accept => 'application/json', 'x-koha-query' => $search } ) >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33960
:
152199
|
152200
|
152201
|
152215
|
155331
|
155332
|
155333
|
155334
|
155335
|
155416
|
155417
|
155418
|
155419
|
155420
|
157899
|
157900
|
157901
|
157902
|
157903
|
157904
|
158071
|
159998
|
159999
|
160000
|
160001
|
160002
|
160552
|
163852
|
163853
|
163854
|
163855
|
163948
|
163949
|
163950
|
163951