Bugzilla – Attachment 170903 Details for
Bug 37791
Fix terminology 'Biblio not found'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37791: Fix 'Biblio not found' messages on the API
Bug-37791-Fix-Biblio-not-found-messages-on-the-API.patch (text/plain), 9.02 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-08-30 11:44:27 UTC
(
hide
)
Description:
Bug 37791: Fix 'Biblio not found' messages on the API
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-08-30 11:44:27 UTC
Size:
9.02 KB
patch
obsolete
>From 74c5d7a2df14a28ca5e93dbd3b8f350dafafec21 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 30 Aug 2024 08:38:35 -0300 >Subject: [PATCH] Bug 37791: Fix 'Biblio not found' messages on the API > >This patch fixes some API-related cases of 'Biblio' terminology >incorrectly used. > >To test: >1. Run: > $ ktd --shell > k$ git grep 'Biblio not found' >=> FAIL: Several occurences >2. Run: > k$ git grep 'render_resource_not_found("Biblio")' >=> FAIL: Several occurences >3. Apply this patches >4. Repeat 1 and 2 >=> SUCCESS: No more occurences! >5. Run: > k$ prove t/db_dependent/api/v1/ >=> SUCCESS: Tests pass! >6. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/REST/V1/Biblios/ItemGroups.pm | 4 ++-- > Koha/REST/V1/DeletedBiblios.pm | 2 +- > Koha/REST/V1/Holds.pm | 2 +- > api/v1/swagger/paths/biblios.yaml | 22 +++++++++++----------- > api/v1/swagger/paths/biblios_merge.yaml | 2 +- > api/v1/swagger/paths/deleted_biblios.yaml | 4 ++-- > api/v1/swagger/paths/holds.yaml | 2 +- > api/v1/swagger/paths/items.yaml | 2 +- > t/db_dependent/api/v1/deleted_biblios.t | 2 +- > 9 files changed, 21 insertions(+), 21 deletions(-) > >diff --git a/Koha/REST/V1/Biblios/ItemGroups.pm b/Koha/REST/V1/Biblios/ItemGroups.pm >index f8552940273..8667a05eca8 100644 >--- a/Koha/REST/V1/Biblios/ItemGroups.pm >+++ b/Koha/REST/V1/Biblios/ItemGroups.pm >@@ -97,7 +97,7 @@ sub add { > return try { > > my $biblio = Koha::Biblios->find( $c->param('biblio_id') ); >- return $c->render_resource_not_found("Biblio") >+ return $c->render_resource_not_found("Bibliographic record") > unless $biblio; > > my $item_group_data = $c->req->json; >@@ -121,7 +121,7 @@ sub add { > if ( $_->isa('Koha::Exceptions::Object::FKConstraint') > and $_->broken_fk eq 'biblio_id' ) > { >- return $c->render_resource_not_found("Biblio"); >+ return $c->render_resource_not_found("Bibliographic record"); > } > } > >diff --git a/Koha/REST/V1/DeletedBiblios.pm b/Koha/REST/V1/DeletedBiblios.pm >index 5fee139357b..d21aa0401c9 100644 >--- a/Koha/REST/V1/DeletedBiblios.pm >+++ b/Koha/REST/V1/DeletedBiblios.pm >@@ -51,7 +51,7 @@ sub get { > > my $biblio = Koha::Old::Biblios->find( { biblionumber => $c->param('biblio_id') }, $attributes ); > >- return $c->render_resource_not_found("Biblio") >+ return $c->render_resource_not_found("Bibliographic record") > unless $biblio; > > return try { >diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm >index bdbe6952ebc..ac9979e0baa 100644 >--- a/Koha/REST/V1/Holds.pm >+++ b/Koha/REST/V1/Holds.pm >@@ -133,7 +133,7 @@ sub add { > unless ($biblio) { > return $c->render( > status => 400, >- openapi => "Biblio not found." >+ openapi => "Bibliographic record not found" > ); > } > >diff --git a/api/v1/swagger/paths/biblios.yaml b/api/v1/swagger/paths/biblios.yaml >index 005d75ec231..039fb1b52a2 100644 >--- a/api/v1/swagger/paths/biblios.yaml >+++ b/api/v1/swagger/paths/biblios.yaml >@@ -100,7 +100,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "406": >@@ -155,7 +155,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "406": >@@ -207,7 +207,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "409": >@@ -266,7 +266,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "406": >@@ -344,7 +344,7 @@ > schema: > $ref: ../swagger.yaml#/definitions/error > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: ../swagger.yaml#/definitions/error > "406": >@@ -419,7 +419,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "500": >@@ -519,7 +519,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "406": >@@ -702,7 +702,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "500": >@@ -749,7 +749,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "406": >@@ -822,7 +822,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "406": >@@ -899,7 +899,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "500": >diff --git a/api/v1/swagger/paths/biblios_merge.yaml b/api/v1/swagger/paths/biblios_merge.yaml >index d3608ea35bb..a46cdf974b8 100644 >--- a/api/v1/swagger/paths/biblios_merge.yaml >+++ b/api/v1/swagger/paths/biblios_merge.yaml >@@ -29,7 +29,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > '404': >- description: Biblio not found >+ description: Bibliographic record not found > schema: > "$ref": "../swagger.yaml#/definitions/error" > '401': >diff --git a/api/v1/swagger/paths/deleted_biblios.yaml b/api/v1/swagger/paths/deleted_biblios.yaml >index e5c6e4fff0d..f4fcae318fc 100644 >--- a/api/v1/swagger/paths/deleted_biblios.yaml >+++ b/api/v1/swagger/paths/deleted_biblios.yaml >@@ -39,7 +39,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "406": >@@ -94,7 +94,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "406": >diff --git a/api/v1/swagger/paths/holds.yaml b/api/v1/swagger/paths/holds.yaml >index 7d75826d935..abf00fd7263 100644 >--- a/api/v1/swagger/paths/holds.yaml >+++ b/api/v1/swagger/paths/holds.yaml >@@ -485,7 +485,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "409": >diff --git a/api/v1/swagger/paths/items.yaml b/api/v1/swagger/paths/items.yaml >index 62209a4eda7..6fe27117c42 100644 >--- a/api/v1/swagger/paths/items.yaml >+++ b/api/v1/swagger/paths/items.yaml >@@ -454,7 +454,7 @@ > schema: > $ref: "../swagger.yaml#/definitions/error" > "404": >- description: Biblio not found >+ description: Bibliographic record not found > schema: > $ref: "../swagger.yaml#/definitions/error" > "500": >diff --git a/t/db_dependent/api/v1/deleted_biblios.t b/t/db_dependent/api/v1/deleted_biblios.t >index b0b7fbb5682..2f13fb71898 100755 >--- a/t/db_dependent/api/v1/deleted_biblios.t >+++ b/t/db_dependent/api/v1/deleted_biblios.t >@@ -103,7 +103,7 @@ subtest 'get() tests' => sub { > my $biblio_exist = $builder->build_sample_biblio(); > $t->get_ok( "//$userid:$password@/api/v1/deleted/biblios/" > . $biblio_exist->biblionumber => { Accept => 'application/marc' } )->status_is(404) >- ->json_is( '/error', 'Biblio not found' ); >+ ->json_is( '/error', 'Bibliographic record not found' ); > > subtest 'marc-in-json encoding tests' => sub { > >-- >2.46.0
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 37791
:
170903
|
170904
|
171493
|
171494
|
171617
|
171618