From 9fc2151eadd48055c49bea32248896dbfc1781c4 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Wed, 9 Aug 2023 11:05:50 +0000 Subject: [PATCH] Bug 34587: Remove begin_date and end_date as usage_data_providers properties/columns (cherry picked from commit 9339eed9358301f7bf17934e2e13fc17205d9cd0) Signed-off-by: Jessica Zairo Signed-off-by: Michaela Sieber Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- Koha/Schema/Result/ErmUsageDataProvider.pm | 24 +- .../definitions/erm_usage_data_provider.yaml | 12 - .../paths/erm_usage_data_providers.yaml | 10 - .../erm_usage_statistics_tables.pl | 2 - installer/data/mysql/kohastructure.sql | 2 - .../UsageStatisticsDataProviderDetails.vue | 12 - .../UsageStatisticsDataProvidersFormAdd.vue | 23 - .../ERM/UsageStatisticsDataProvidersShow.vue | 17 + .../integration/ERM/DataProviders_spec.ts | 758 ++++++++++-------- t/cypress/support/e2e.js | 2 - 10 files changed, 462 insertions(+), 400 deletions(-) diff --git a/Koha/Schema/Result/ErmUsageDataProvider.pm b/Koha/Schema/Result/ErmUsageDataProvider.pm index de4ec8877b..e2f5635661 100644 --- a/Koha/Schema/Result/ErmUsageDataProvider.pm +++ b/Koha/Schema/Result/ErmUsageDataProvider.pm @@ -94,22 +94,6 @@ service_url of the harvester report_release of the harvester -=head2 begin_date - - data_type: 'date' - datetime_undef_if_invalid: 1 - is_nullable: 1 - -start date of the harvester - -=head2 end_date - - data_type: 'date' - datetime_undef_if_invalid: 1 - is_nullable: 1 - -end date of the harvester - =head2 customer_id data_type: 'varchar' @@ -179,10 +163,6 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 1, size => 80 }, "report_release", { data_type => "varchar", is_nullable => 1, size => 80 }, - "begin_date", - { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, - "end_date", - { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "customer_id", { data_type => "varchar", is_nullable => 1, size => 50 }, "requestor_id", @@ -331,8 +311,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-07-26 14:35:34 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AVt5SSRe/g6EmvBtASWHPA +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-08-09 11:00:27 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:B99vhhVjbyR/7VoGHcrnFA # __PACKAGE__->add_columns( # '+active' => { is_boolean => 1 } diff --git a/api/v1/swagger/definitions/erm_usage_data_provider.yaml b/api/v1/swagger/definitions/erm_usage_data_provider.yaml index 238cfa6521..f1c11bd3b0 100644 --- a/api/v1/swagger/definitions/erm_usage_data_provider.yaml +++ b/api/v1/swagger/definitions/erm_usage_data_provider.yaml @@ -43,18 +43,6 @@ properties: type: - string - "null" - begin_date: - type: - - string - - "null" - format: date - description: Start of the harvester - end_date: - type: - - string - - "null" - format: date - description: End of the harvester customer_id: description: customer_id of the harvester type: diff --git a/api/v1/swagger/paths/erm_usage_data_providers.yaml b/api/v1/swagger/paths/erm_usage_data_providers.yaml index 779b335c5d..7c5aa88e1d 100644 --- a/api/v1/swagger/paths/erm_usage_data_providers.yaml +++ b/api/v1/swagger/paths/erm_usage_data_providers.yaml @@ -54,16 +54,6 @@ name: report_release required: false type: string - - description: Case insensitive search on usage_data_provider begin_date - in: query - name: begin_date - required: false - type: string - - description: Case insensitive search on usage_data_provider end_date - in: query - name: end_date - required: false - type: string - description: Case insensitive search on usage_data_provider customer_id in: query name: customer_id diff --git a/installer/data/mysql/atomicupdate/erm_usage_statistics_tables.pl b/installer/data/mysql/atomicupdate/erm_usage_statistics_tables.pl index 325931ed63..0f955eb6d0 100644 --- a/installer/data/mysql/atomicupdate/erm_usage_statistics_tables.pl +++ b/installer/data/mysql/atomicupdate/erm_usage_statistics_tables.pl @@ -20,8 +20,6 @@ return { `service_type` varchar(80) DEFAULT NULL COMMENT 'service_type of the harvester', `service_url` varchar(80) DEFAULT NULL COMMENT 'service_url of the harvester', `report_release` varchar(80) DEFAULT NULL COMMENT 'report_release of the harvester', - `begin_date` date DEFAULT NULL COMMENT 'start date of the harvester', - `end_date` date DEFAULT NULL COMMENT 'end date of the harvester', `customer_id` varchar(50) DEFAULT NULL COMMENT 'sushi customer id', `requestor_id` varchar(50) DEFAULT NULL COMMENT 'sushi requestor id', `api_key` varchar(80) DEFAULT NULL COMMENT 'sushi api key', diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index d834bd8408..08f2f623ae 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3140,8 +3140,6 @@ CREATE TABLE `erm_usage_data_providers` ( `service_type` varchar(80) DEFAULT NULL COMMENT 'service_type of the harvester', `service_url` varchar(80) DEFAULT NULL COMMENT 'service_url of the harvester', `report_release` varchar(80) DEFAULT NULL COMMENT 'report_release of the harvester', - `begin_date` date DEFAULT NULL COMMENT 'start date of the harvester', - `end_date` date DEFAULT NULL COMMENT 'end date of the harvester', `customer_id` varchar(50) DEFAULT NULL COMMENT 'sushi customer id', `requestor_id` varchar(50) DEFAULT NULL COMMENT 'sushi requestor id', `api_key` varchar(80) DEFAULT NULL COMMENT 'sushi api key', diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProviderDetails.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProviderDetails.vue index 50ce56cbc5..3b9b4eee47 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProviderDetails.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProviderDetails.vue @@ -26,18 +26,6 @@ {{ usage_data_provider.service_type }} -
  • - - - {{ usage_data_provider.begin_date }} - -
  • -
  • - - - {{ usage_data_provider.end_date }} - -
  • diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue index 827724b752..7a12acb00c 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue @@ -80,27 +80,6 @@ v-model="usage_data_provider.service_type" />
  • -
  • - - -
  • -
  • - - -