From 15761027f511cc45427f5d87188170d2be9b851f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 30 May 2022 13:56:52 +0200 Subject: [PATCH] Bug 32030: Add title.external_id Signed-off-by: Jonathan Field Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- api/v1/swagger/definitions/erm_eholdings_package.yaml | 2 +- api/v1/swagger/definitions/erm_eholdings_title.yaml | 5 +++++ api/v1/swagger/paths/erm_eholdings_titles.yaml | 5 +++++ installer/data/mysql/atomicupdate/erm.pl | 3 ++- installer/data/mysql/kohastructure.sql | 3 ++- .../js/vue/components/ERM/EHoldingsPackagesFormAdd.vue | 4 ++-- .../prog/js/vue/components/ERM/EHoldingsPackagesShow.vue | 8 ++++---- .../prog/js/vue/components/ERM/EHoldingsTitlesFormAdd.vue | 1 + .../prog/js/vue/components/ERM/EHoldingsTitlesShow.vue | 7 +++++++ 9 files changed, 29 insertions(+), 9 deletions(-) diff --git a/api/v1/swagger/definitions/erm_eholdings_package.yaml b/api/v1/swagger/definitions/erm_eholdings_package.yaml index b3d055973f..dac059192e 100644 --- a/api/v1/swagger/definitions/erm_eholdings_package.yaml +++ b/api/v1/swagger/definitions/erm_eholdings_package.yaml @@ -13,7 +13,7 @@ properties: name: description: name of the package type: string - external_package_id: + external_id: description: external id of the package type: - string diff --git a/api/v1/swagger/definitions/erm_eholdings_title.yaml b/api/v1/swagger/definitions/erm_eholdings_title.yaml index d941fc3258..6e6112a699 100644 --- a/api/v1/swagger/definitions/erm_eholdings_title.yaml +++ b/api/v1/swagger/definitions/erm_eholdings_title.yaml @@ -13,6 +13,11 @@ properties: publication_title: description: publication_title of the title type: string + external_id: + description: External id of the title + type: + - string + - "null" print_identifier: description: print_identifier of the title type: diff --git a/api/v1/swagger/paths/erm_eholdings_titles.yaml b/api/v1/swagger/paths/erm_eholdings_titles.yaml index bd31232a71..cae8ed0f13 100644 --- a/api/v1/swagger/paths/erm_eholdings_titles.yaml +++ b/api/v1/swagger/paths/erm_eholdings_titles.yaml @@ -24,6 +24,11 @@ name: publication_title required: false type: string + - description: Case insensitive search on title external_id + in: query + name: external_id + required: false + type: string - description: Case insensitive search on title print_identifier in: query name: print_identifier diff --git a/installer/data/mysql/atomicupdate/erm.pl b/installer/data/mysql/atomicupdate/erm.pl index c2cb106308..60a933221f 100755 --- a/installer/data/mysql/atomicupdate/erm.pl +++ b/installer/data/mysql/atomicupdate/erm.pl @@ -190,7 +190,7 @@ return { `package_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `vendor_id` INT(11) DEFAULT NULL COMMENT 'foreign key to aqbooksellers', `name` VARCHAR(255) NOT NULL COMMENT 'name of the package', - `external_package_id` VARCHAR(255) DEFAULT NULL COMMENT 'External key', + `external_id` VARCHAR(255) DEFAULT NULL COMMENT 'External key', `package_type` VARCHAR(80) DEFAULT NULL COMMENT 'type of the package', `content_type` VARCHAR(80) DEFAULT NULL COMMENT 'type of the package', `created_on` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date of creation of the package', @@ -217,6 +217,7 @@ return { `title_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `vendor_id` INT(11) DEFAULT NULL, `publication_title` VARCHAR(255) DEFAULT NULL, + `external_id` VARCHAR(255) DEFAULT NULL, `print_identifier` VARCHAR(255) DEFAULT NULL, `online_identifier` VARCHAR(255) DEFAULT NULL, `date_first_issue_online` VARCHAR(255) DEFAULT NULL, diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 66faff4a8a..f0358f8142 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2901,7 +2901,7 @@ CREATE TABLE `erm_eholdings_packages` ( `package_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `vendor_id` INT(11) DEFAULT NULL COMMENT 'foreign key to aqbooksellers', `name` VARCHAR(255) NOT NULL COMMENT 'name of the package', - `external_package_id` VARCHAR(255) DEFAULT NULL COMMENT 'External key', + `external_id` VARCHAR(255) DEFAULT NULL COMMENT 'External key', `package_type` VARCHAR(80) DEFAULT NULL COMMENT 'type of the package', `content_type` VARCHAR(80) DEFAULT NULL COMMENT 'type of the package', `created_on` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date of creation of the package', @@ -2930,6 +2930,7 @@ CREATE TABLE `erm_eholdings_titles` ( `title_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `vendor_id` INT(11) DEFAULT NULL, `publication_title` VARCHAR(255) DEFAULT NULL, + `external_id` VARCHAR(255) DEFAULT NULL, `print_identifier` VARCHAR(255) DEFAULT NULL, `online_identifier` VARCHAR(255) DEFAULT NULL, `date_first_issue_online` VARCHAR(255) DEFAULT NULL, diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesFormAdd.vue index 4389975760..b3ed7f7965 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesFormAdd.vue @@ -139,7 +139,7 @@ export default { erm_package: { package_id: null, name: '', - external_package_id: null, + external_id: '', package_type: '', content_type: '', package_agreements: [], @@ -208,4 +208,4 @@ export default { }, name: "EHoldingsPackagesFormAdd", } - \ No newline at end of file + diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue index 8d2182e7d3..4253be0499 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue @@ -36,10 +36,10 @@ }} -
  • +
  • - {{ erm_package.external_package_id }} + {{ erm_package.external_id }}
  • @@ -134,7 +134,7 @@ export default { package_id: null, vendor_id: null, name: '', - external_package_id: '', + external_id: '', package_type: '', content_type: '', created_on: null, @@ -165,4 +165,4 @@ export default { padding-left: 0.2em; font-size: 11px; } - \ No newline at end of file + diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesFormAdd.vue index 71d9c326ae..2284321d36 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesFormAdd.vue @@ -424,6 +424,7 @@ export default { title_id: null, vendor_id: null, publication_title: '', + external_id: '', print_identifier: '', online_identifier: '', date_first_issue_online: '', diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesShow.vue index 9f25e6238f..9f526c21f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesShow.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesShow.vue @@ -34,6 +34,12 @@ {{ title.publication_title }}
  • +
  • + + + {{ title.external_id }} + +
  • @@ -294,6 +300,7 @@ export default { title_id: null, vendor_id: null, publication_title: '', + external_id: '', print_identifier: '', online_identifier: '', date_first_issue_online: '', -- 2.39.5