Bugzilla – Attachment 155334 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), 1.84 KB, created by
Nick Clemens (kidclamp)
on 2023-09-07 16:28:05 UTC
(
hide
)
Description:
Bug 33960: (QA follow-up) ->delete doesn't send to deletedbiblio
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-09-07 16:28:05 UTC
Size:
1.84 KB
patch
obsolete
>From 9b58e46679a47415729ec0984690c313632bbee6 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 | 3 ++- > t/db_dependent/api/v1/biblios.t | 5 +++-- > 2 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/Koha/REST/V1/Biblios.pm b/Koha/REST/V1/Biblios.pm >index 4f198ef7b6..0f628d6ff5 100644 >--- a/Koha/REST/V1/Biblios.pm >+++ b/Koha/REST/V1/Biblios.pm >@@ -803,7 +803,8 @@ sub list { > push @prefetch, 'metadata' # don't prefetch metadata if not needed > unless $c->req->headers->accept =~ m/application\/json/; > >- my $deleted = delete $c->param->{deleted}; >+ my $deleted = $c->param('deleted'); >+ $c->req->params->remove('deleted'); > > my $rs = $deleted ? Koha::Old::Biblios->search() : Koha::Biblios->search( undef, { prefetch => \@prefetch } ); > my $biblios = $c->objects->search_rs( $rs, [(sub{ $rs->api_query_fixer( $_[0], '', $_[1] ) })] ); >diff --git a/t/db_dependent/api/v1/biblios.t b/t/db_dependent/api/v1/biblios.t >index e240d009b7..c5d7ff29f3 100755 >--- a/t/db_dependent/api/v1/biblios.t >+++ b/t/db_dependent/api/v1/biblios.t >@@ -31,6 +31,7 @@ use t::lib::TestBuilder; > use Mojo::JSON qw(encode_json); > > use C4::Auth; >+use C4::Biblio qw( DelBiblio ); > use C4::Circulation qw( AddIssue AddReturn ); > > use Koha::Biblios; >@@ -1696,8 +1697,8 @@ subtest 'list() tests' => sub { > { Accept => 'text/plain' } ) > ->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.30.2
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