Bug 32030: Add title.external_id
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 30 May 2022 11:56:52 +0000 (13:56 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 8 Nov 2022 12:44:05 +0000 (09:44 -0300)
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
api/v1/swagger/definitions/erm_eholdings_package.yaml
api/v1/swagger/definitions/erm_eholdings_title.yaml
api/v1/swagger/paths/erm_eholdings_titles.yaml
installer/data/mysql/atomicupdate/erm.pl
installer/data/mysql/kohastructure.sql
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesFormAdd.vue
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesFormAdd.vue
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesShow.vue

index b3d0559..dac0591 100644 (file)
@@ -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
index d941fc3..6e6112a 100644 (file)
@@ -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:
index bd31232..cae8ed0 100644 (file)
         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
index c2cb106..60a9332 100755 (executable)
@@ -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,
index 66faff4..f0358f8 100644 (file)
@@ -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,
index 4389975..b3ed7f7 100644 (file)
@@ -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",
 }
-</script>
\ No newline at end of file
+</script>
index 8d2182e..4253be0 100644 (file)
                             }}
                         </span>
                     </li>
-                    <li v-if="erm_package.external_package_id">
+                    <li v-if="erm_package.external_id">
                         <label>{{ $t("External ID") }}:</label>
                         <span>
-                            {{ erm_package.external_package_id }}
+                            {{ erm_package.external_id }}
                         </span>
                     </li>
                     <li>
@@ -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;
 }
-</style>
\ No newline at end of file
+</style>
index 71d9c32..2284321 100644 (file)
@@ -424,6 +424,7 @@ export default {
                 title_id: null,
                 vendor_id: null,
                 publication_title: '',
+                external_id: '',
                 print_identifier: '',
                 online_identifier: '',
                 date_first_issue_online: '',
index 9f25e62..9f526c2 100644 (file)
                             {{ title.publication_title }}
                         </span>
                     </li>
+                    <li v-if="title.external_id">
+                        <label>{{ $t("External ID") }}:</label>
+                        <span>
+                            {{ title.external_id }}
+                        </span>
+                    </li>
                     <li>
                         <label>{{ $t("Vendor") }}:</label>
                         <span v-if="title.vendor_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: '',