Bugzilla – Attachment 188681 Details for
Bug 17387
Add an undelete feature for items/biblios
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17387: add items embed to deleted biblios API
Bug-17387-add-items-embed-to-deleted-biblios-API.patch (text/plain), 1.85 KB, created by
Jacob O'Mara
on 2025-10-30 16:38:46 UTC
(
hide
)
Description:
Bug 17387: add items embed to deleted biblios API
Filename:
MIME Type:
Creator:
Jacob O'Mara
Created:
2025-10-30 16:38:46 UTC
Size:
1.85 KB
patch
obsolete
>From 62c9ef46ecdd600b98faf41a7393a86a6e1b66c2 Mon Sep 17 00:00:00 2001 >From: Jacob O'Mara <Jacob.omara@openfifth.co.uk> >Date: Thu, 30 Oct 2025 11:41:13 +0000 >Subject: [PATCH] Bug 17387: add items embed to deleted biblios API > >--- > Koha/Old/Biblio.pm | 14 ++++++++++++++ > api/v1/swagger/paths/deleted_biblios.yaml | 9 +++++++++ > 2 files changed, 23 insertions(+) > >diff --git a/Koha/Old/Biblio.pm b/Koha/Old/Biblio.pm >index 7984fb918d2..df6bd29c2ba 100644 >--- a/Koha/Old/Biblio.pm >+++ b/Koha/Old/Biblio.pm >@@ -25,6 +25,7 @@ use Koha::Biblioitem; > use Koha::Biblio::Metadata; > use Koha::Old::Biblio::Metadatas; > use Koha::Old::Biblioitems; >+use Koha::Old::Items; > use Koha::SearchEngine::Indexer; > > =head1 NAME >@@ -93,6 +94,19 @@ sub biblioitem { > return Koha::Old::Biblioitems->find( { biblionumber => $self->biblionumber } ); > } > >+=head3 items >+ >+my $items = $deleted_biblio->items; >+ >+Returns the related Koha::Old::Items for this deleted biblio >+ >+=cut >+ >+sub items { >+ my ($self) = @_; >+ return Koha::Old::Items->search( { biblionumber => $self->biblionumber } ); >+} >+ > =head3 to_api > > my $json = $deleted_biblio->to_api; >diff --git a/api/v1/swagger/paths/deleted_biblios.yaml b/api/v1/swagger/paths/deleted_biblios.yaml >index dff1890ea9d..f86913c8f53 100644 >--- a/api/v1/swagger/paths/deleted_biblios.yaml >+++ b/api/v1/swagger/paths/deleted_biblios.yaml >@@ -14,6 +14,15 @@ > - $ref: "../swagger.yaml#/parameters/q_param" > - $ref: "../swagger.yaml#/parameters/q_body" > - $ref: "../swagger.yaml#/parameters/request_id_header" >+ - name: x-koha-embed >+ in: header >+ required: false >+ description: Embed list sent as a request header >+ type: array >+ items: >+ type: string >+ enum: >+ - items > produces: > - application/json > - application/marcxml+xml >-- >2.39.5
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 17387
:
188670
|
188671
|
188672
|
188673
|
188674
|
188675
|
188676
|
188677
|
188678
|
188679
|
188680
|
188681
|
188682
|
188683
|
188684
|
188685
|
188686
|
188687
|
188688
|
188689
|
188690
|
188691
|
188692
|
188693
|
188694
|
188695
|
188696
|
188697
|
188698
|
188699
|
188700
|
188701
|
188780
|
188781
|
188782
|
188783
|
188784
|
188785
|
188786
|
188787
|
188788
|
188789
|
188790
|
188791
|
188792
|
188793
|
188794
|
188795
|
189046
|
189047
|
189048
|
189049
|
189050
|
189051
|
189052
|
189053
|
189054
|
189055
|
189056
|
189057
|
189058
|
189059
|
189060
|
189061
|
189062
|
189082
|
189083
|
189084
|
189085
|
189086
|
189087
|
189088
|
189089
|
189090
|
189091
|
189092
|
189093
|
189094
|
189095
|
189096
|
189097
|
189098
|
189099
|
189100
|
189101
|
189102
|
189103
|
189104
|
189105
|
189106
|
189107
|
189108
|
189109
|
189110
|
189111
|
189112
|
189113
|
189114
|
189115
|
189116
|
189117
|
189118
|
189119