From 19fc1bdef5f7b4442f4e2961749f899f334a8395 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 18 Oct 2022 19:18:19 +0000 Subject: [PATCH] Bug 32030: Add Notes field to erm_eholdings_packages table - Added API specs for new field 'notes' for erm_holdings_package; - Added new field 'notes' in DB schema for erm; - Added new field 'notes' in Vue.js frontend 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 | 5 +++++ api/v1/swagger/paths/erm_eholdings_packages.yaml | 5 +++++ installer/data/mysql/atomicupdate/erm.pl | 1 + installer/data/mysql/kohastructure.sql | 1 + .../components/ERM/EHoldingsLocalPackagesFormAdd.vue | 10 ++++++++++ .../vue/components/ERM/EHoldingsLocalPackagesList.vue | 9 +++++++++ .../vue/components/ERM/EHoldingsLocalPackagesShow.vue | 4 ++++ 7 files changed, 35 insertions(+) diff --git a/api/v1/swagger/definitions/erm_eholdings_package.yaml b/api/v1/swagger/definitions/erm_eholdings_package.yaml index 190e751772..328971897c 100644 --- a/api/v1/swagger/definitions/erm_eholdings_package.yaml +++ b/api/v1/swagger/definitions/erm_eholdings_package.yaml @@ -38,6 +38,11 @@ properties: type: - string - "null" + notes: + description: notes about the package + type: + - string + - "null" created_on: description: date of creation type: diff --git a/api/v1/swagger/paths/erm_eholdings_packages.yaml b/api/v1/swagger/paths/erm_eholdings_packages.yaml index 7064e4a2f3..fd0d58d84b 100644 --- a/api/v1/swagger/paths/erm_eholdings_packages.yaml +++ b/api/v1/swagger/paths/erm_eholdings_packages.yaml @@ -44,6 +44,11 @@ name: content_type required: false type: string + - description: Case insensitive search on package notes + in: query + name: notes + required: false + type: string - description: Case insensitive search on package creation date in: query name: created_on diff --git a/installer/data/mysql/atomicupdate/erm.pl b/installer/data/mysql/atomicupdate/erm.pl index df7d09fc94..7b781d19d2 100755 --- a/installer/data/mysql/atomicupdate/erm.pl +++ b/installer/data/mysql/atomicupdate/erm.pl @@ -197,6 +197,7 @@ return { `provider` ENUM('ebsco') DEFAULT NULL COMMENT 'External provider', `package_type` VARCHAR(80) DEFAULT NULL COMMENT 'type of the package', `content_type` VARCHAR(80) DEFAULT NULL COMMENT 'type of the package', + `notes` mediumtext DEFAULT NULL COMMENT 'notes about this package', `created_on` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date of creation of the package', CONSTRAINT `erm_packages_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, PRIMARY KEY(`package_id`) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 8128681f6a..5d78453160 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2908,6 +2908,7 @@ CREATE TABLE `erm_eholdings_packages` ( `provider` ENUM('ebsco') DEFAULT NULL COMMENT 'External provider', `package_type` VARCHAR(80) DEFAULT NULL COMMENT 'type of the package', `content_type` VARCHAR(80) DEFAULT NULL COMMENT 'type of the package', + `notes` mediumtext DEFAULT NULL COMMENT 'notes about this package', `created_on` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date of creation of the package', CONSTRAINT `erm_eholdings_packages_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, PRIMARY KEY(`package_id`) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesFormAdd.vue index 82b739326e..433c3e1a58 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesFormAdd.vue @@ -55,6 +55,15 @@ :options="av_package_content_types" /> +
  • + +