From 5e3fedcedaf597861483ce021f42bfb79dea9c4f Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 6 Nov 2023 21:55:41 +0000 Subject: [PATCH] Bug 34784: (QA follow-up) Terminology: callnumber, biblio, syspref --- Koha/REST/V1/Biblios.pm | 6 +-- api/v1/swagger/paths/biblios.yaml | 48 +++++++++---------- .../data/mysql/atomicupdate/bug_34784.pl | 7 +-- installer/data/mysql/mandatory/sysprefs.sql | 2 +- .../prog/en/includes/cat-toolbar.inc | 2 +- .../admin/preferences/cataloguing.pref | 4 +- .../prog/en/modules/catalogue/detail.tt | 6 +-- koha-tmpl/intranet-tmpl/prog/js/catalog.js | 8 ++-- t/db_dependent/api/v1/biblios.t | 2 +- 9 files changed, 43 insertions(+), 42 deletions(-) diff --git a/Koha/REST/V1/Biblios.pm b/Koha/REST/V1/Biblios.pm index 727a2e4445..6174c89fc8 100644 --- a/Koha/REST/V1/Biblios.pm +++ b/Koha/REST/V1/Biblios.pm @@ -154,8 +154,8 @@ sub delete { =head3 populate_empty_callnumbers -Controller function that populates the item callnumbers of any items -for the record that currently have no callnumber. The generated callnumbers +Controller function that populates the item call numbers of any items +for the record that currently have no call number. The generated call numbers will be based on the 'itemcallnumber' system preference. =cut @@ -241,7 +241,7 @@ sub populate_empty_callnumbers { =head3 default_item_callnumber -Return the callnumber generated for the given record based on the "itemcallnumber" system preference. +Return the call number generated for the given record based on the "itemcallnumber" system preference. =cut sub default_item_callnumber { diff --git a/api/v1/swagger/paths/biblios.yaml b/api/v1/swagger/paths/biblios.yaml index 5b7681f487..44abf65024 100644 --- a/api/v1/swagger/paths/biblios.yaml +++ b/api/v1/swagger/paths/biblios.yaml @@ -92,7 +92,7 @@ schema: $ref: "../swagger.yaml#/definitions/error" "404": - description: Biblio not found + description: Bibliographic record not found schema: $ref: "../swagger.yaml#/definitions/error" "406": @@ -143,7 +143,7 @@ schema: $ref: "../swagger.yaml#/definitions/error" "404": - description: Biblio not found + description: Bibliographic record not found schema: $ref: "../swagger.yaml#/definitions/error" "406": @@ -179,7 +179,7 @@ - application/json responses: "204": - description: Biblio deleted + description: Bibliographic record deleted schema: type: string "401": @@ -191,7 +191,7 @@ schema: $ref: "../swagger.yaml#/definitions/error" "404": - description: Biblio not found + description: Bibliographic record not found schema: $ref: "../swagger.yaml#/definitions/error" "409": @@ -250,7 +250,7 @@ schema: $ref: "../swagger.yaml#/definitions/error" "404": - description: Biblio not found + description: Bibliographic record not found schema: $ref: "../swagger.yaml#/definitions/error" "406": @@ -320,7 +320,7 @@ schema: $ref: ../swagger.yaml#/definitions/error "404": - description: Biblio not found + description: Bibliographic record not found schema: $ref: ../swagger.yaml#/definitions/error "406": @@ -387,7 +387,7 @@ schema: $ref: "../swagger.yaml#/definitions/error" "404": - description: Biblio not found + description: Bibliographic record not found schema: $ref: "../swagger.yaml#/definitions/error" "500": @@ -455,7 +455,7 @@ schema: $ref: "../swagger.yaml#/definitions/error" "404": - description: Biblio not found + description: Bibliographic record not found schema: $ref: "../swagger.yaml#/definitions/error" "406": @@ -542,14 +542,14 @@ - biblios - items - callnumbers - summary: Populate empty item callnumbers from biblio callnumber for all items on record with no callnumber + summary: Populate empty item call numbers from call number in bibliographic record for all items on record with no call number parameters: - $ref: "../swagger.yaml#/parameters/biblio_id_pp" produces: - application/json responses: "200": - description: Callnumbers updated + description: Call numbers updated schema: type: object properties: @@ -557,7 +557,7 @@ description: Number of items updated type: integer callnumber: - description: Callnumber added to updated items + description: Call number added to updated items type: string "400": description: Bad request @@ -601,7 +601,7 @@ - biblios - items - callnumbers - summary: Populate empty item callnumber from biblio callnumber for a given item + summary: Populate empty item call number from call number in the bibliographic record for a given item parameters: - $ref: "../swagger.yaml#/parameters/biblio_id_pp" - $ref: "../swagger.yaml#/parameters/item_id_pp" @@ -609,7 +609,7 @@ - application/json responses: "200": - description: Callnumbers updated + description: Call numbers updated schema: type: object properties: @@ -617,7 +617,7 @@ description: Number of items updated type: integer callnumber: - description: Callnumber added to updated items + description: Call number added to updated items type: string "400": description: Bad request @@ -716,7 +716,7 @@ operationId: getBiblioPickupLocations tags: - biblios - summary: Get valid pickup locations for a biblio + summary: Get valid pickup locations for a bibliographic record parameters: - $ref: "../swagger.yaml#/parameters/biblio_id_pp" - name: patron_id @@ -736,7 +736,7 @@ - application/json responses: "200": - description: Biblio pickup locations + description: Pickup locations for bibliographic record schema: type: array items: @@ -754,7 +754,7 @@ schema: $ref: "../swagger.yaml#/definitions/error" "404": - description: Biblio not found + description: Bibliographic record not found schema: $ref: "../swagger.yaml#/definitions/error" "500": @@ -777,7 +777,7 @@ operationId: getBiblioPublic tags: - biblios - summary: Get biblio (public) + summary: Get bibliograpic record (public) parameters: - $ref: "../swagger.yaml#/parameters/biblio_id_pp" produces: @@ -797,7 +797,7 @@ schema: $ref: "../swagger.yaml#/definitions/error" "404": - description: Biblio not found + description: Bibliographic record not found schema: $ref: "../swagger.yaml#/definitions/error" "406": @@ -863,7 +863,7 @@ schema: $ref: "../swagger.yaml#/definitions/error" "404": - description: Biblio not found + description: Bibliographic record not found schema: $ref: "../swagger.yaml#/definitions/error" "406": @@ -936,7 +936,7 @@ schema: $ref: "../swagger.yaml#/definitions/error" "404": - description: Biblio not found + description: Bibliographic record not found schema: $ref: "../swagger.yaml#/definitions/error" "500": @@ -956,7 +956,7 @@ operationId: getBiblioDefaultItemCallnumber tags: - biblios - summary: Get default item callnumber for a biblio + summary: Get default item call number for a bibliographic record parameters: - $ref: "../swagger.yaml#/parameters/biblio_id_pp" produces: @@ -968,7 +968,7 @@ type: object properties: callnumber: - description: Item call number benerated for biblio + description: Item call number generated for bibliographic record type: string "401": description: Authentication required @@ -979,7 +979,7 @@ schema: $ref: "../swagger.yaml#/definitions/error" "404": - description: Biblio not found + description: Bibliograpic record not found schema: $ref: "../swagger.yaml#/definitions/error" "500": diff --git a/installer/data/mysql/atomicupdate/bug_34784.pl b/installer/data/mysql/atomicupdate/bug_34784.pl index 448e54c67b..94e036a052 100755 --- a/installer/data/mysql/atomicupdate/bug_34784.pl +++ b/installer/data/mysql/atomicupdate/bug_34784.pl @@ -2,15 +2,16 @@ use Modern::Perl; return { bug_number => "34784", - description => "Add ability to populate empty item callnumbers for a record based on the itemcallnumber syspref", - up => sub { + description => + "Add ability to populate empty item call numbers for a record based on the itemcallnumber system preferene", + up => sub { my ($args) = @_; my ( $dbh, $out ) = @$args{qw(dbh out)}; $dbh->do( q{ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) - VALUES ('EnablePopulateCallnumbers','0','','Enable populate callnumber feature','YesNo') + VALUES ('EnablePopulateCallnumbers','0','','Enable populate call number feature','YesNo') } ); diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 72b949c9a7..8957d9936e 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -232,7 +232,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('EnableItemGroups','0','','Enable the item groups feature','YesNo'), ('EnableOpacSearchHistory','1','YesNo','Enable or disable opac search history',''), ('EnablePointOfSale','0',NULL,'Enable the point of sale feature to allow anonymous transactions with the accounting system. (Requires UseCashRegisters)','YesNo'), -('EnablePopulateCallnumbers','0','','Enable populate callnumber feature','YesNo'), +('EnablePopulateCallnumbers','0','','Enable populate call number feature','YesNo'), ('EnableSearchHistory','0','','Enable or disable search history','YesNo'), ('EnhancedMessagingPreferences','1','','If ON, allows patrons to select to receive additional messages about items due or nearly due.','YesNo'), ('EnhancedMessagingPreferencesOPAC', '1', NULL, 'If ON, show patrons messaging setting on the OPAC.', 'YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index 45bc205a9c..d78fa40490 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -44,7 +44,7 @@ [% END %] [% IF Koha.Preference('EnablePopulateCallnumbers') && ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel ) or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %] -
  • Populate call numbers
  • +
  • Populate call numbers
  • [% END %] [% IF CAN_user_editcatalogue_edit_items or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref index 37eff97140..69a3b47952 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref @@ -81,7 +81,7 @@ Cataloging: choices: 1: Show 0: "Don't show" - - buttons on the bibliographic details page to populate empty item callnumbers from the record based on the itemcallnumber system preference. + - buttons on the catalog details page to populate empty item call numbers from the bibliographic record based on the itemcallnumber system preference. - Record structure: - @@ -115,7 +115,7 @@ Cataloging: - - Map the MARC subfields - pref: itemcallnumber - - "to an item's callnumber. List multiple comma-separated fields to check them sequentially. Each field can include multiple subfields. The order of the subfields in the record will be preserved. For example: '082ab,092ab' will look in the 082$a and 082$b, then the 092$a and 092$b." + - "to an item's call number. List multiple comma-separated fields to check them sequentially. Each field can include multiple subfields. The order of the subfields in the record will be preserved. For example: '082ab,092ab' will look in the 082$a and 082$b, then the 092$a and 092$b." - "Examples for MARC21: Dewey: 082ab,092ab; LOC: 050ab,090ab; from the Koha record: 942hi. Examples for UNIMARC: Dewey: 676a; LOC: 680ab." - - Display MARC subfield diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 0f0fba3d7b..3f1b0ca6e5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -652,7 +652,7 @@
  • Upload image
  • [% END %] [% IF show_itemcallnumber_link %] -
  • Populate callnumber
  • +
  • Populate call number
  • [% END %] @@ -794,7 +794,7 @@ [% END %] [% IF ( subscription.closed ) %]

    This subscription is closed.

    [% END %] [% IF ( subscription.location ) %]

    Location: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %]

    [% END %] - [% IF ( subscription.callnumber ) %]

    Callnumber: [% subscription.callnumber | html %]

    [% END %] + [% IF ( subscription.callnumber ) %]

    Call number: [% subscription.callnumber | html %]

    [% END %] [% IF ( subscription.subscriptionnotes ) %]

    [% subscription.subscriptionnotes | html | html_line_break %]

    [% END %] [% IF ( subscription.missinglist ) %]

    Missing issues: [% subscription.missinglist | html %]

    [% END %] [% IF ( subscription.librariannote ) %]

    ([% subscription.librariannote | html %])

    [% END %] @@ -1902,7 +1902,7 @@ }, { "data": "callnumber", - "title": _("Callnumber"), + "title": _("Call number"), "searchable": true, "orderable": true, }, diff --git a/koha-tmpl/intranet-tmpl/prog/js/catalog.js b/koha-tmpl/intranet-tmpl/prog/js/catalog.js index c159cdcae3..55e2a8ec3d 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/catalog.js +++ b/koha-tmpl/intranet-tmpl/prog/js/catalog.js @@ -128,12 +128,12 @@ $(document).ready(function() { .on('click', function() { $.getJSON( `/api/v1/biblios/${biblionumber}/default_item_callnumber`, function( cn ) { const callnumber = cn.callnumber; - if ( confirm(__(`Are you sure you want to populate callnumbers for all items without a callnumber on this record to the following value: ${callnumber}`)) ) { + if ( confirm(__(`Are you sure you want to populate call numbers for all items without a call number on this record to the following value: ${callnumber}`)) ) { const biblionumber = $(this).data('biblionumber'); $.post( `/api/v1/biblios/${biblionumber}/items/populate_empty_callnumbers`, function( data ) { const items_updated = data.items_updated; const callnumber = data.callnumber; - let msg = __('Items populated with the callnumber "%s": %s').format(callnumber, items_updated); + let msg = __('Items populated with the call number "%s": %s').format(callnumber, items_updated); if ( items_updated ) { msg += " " + __('Reload the page?'); @@ -152,13 +152,13 @@ $(document).ready(function() { .on('click', function() { $.getJSON( `/api/v1/biblios/${biblionumber}/default_item_callnumber`, function( cn ) { const callnumber = cn.callnumber; - if ( confirm(__(`Are you sure you want to populate the callnumber for this item to the following value: ${callnumber}`)) ) { + if ( confirm(__(`Are you sure you want to populate the call number for this item to the following value: ${callnumber}`)) ) { const biblionumber = $(this).data('biblionumber'); const itemnumber = $(this).data('itemnumber'); const button = $(this); $.post( `/api/v1/biblios/${biblionumber}/items/${itemnumber}/populate_empty_callnumbers`, function( data ) { const callnumber = data.callnumber; - let msg = __('Item populated with the callnumber "%s"').format(callnumber); + let msg = __('Item populated with the call number "%s"').format(callnumber); msg += " " + __('Reload the page?'); if( confirm(msg) ) { location.reload(true); diff --git a/t/db_dependent/api/v1/biblios.t b/t/db_dependent/api/v1/biblios.t index 9d44600023..875d75c739 100755 --- a/t/db_dependent/api/v1/biblios.t +++ b/t/db_dependent/api/v1/biblios.t @@ -1862,7 +1862,7 @@ subtest 'populate_empty_callnumbers() tests' => sub { $t->post_ok( "//$userid:$password@/api/v1/biblios/$biblio_id/items/$item1_id/populate_empty_callnumbers" => json => {} ) - ->status_is( 404, 'Callnumber fields not found' ); + ->status_is( 404, 'Call number fields not found' ); t::lib::Mocks::mock_preference( 'itemcallnumber', '245$a' ); -- 2.30.2