From b74a8be817a5a3602f423d8b5c58239c08946f51 Mon Sep 17 00:00:00 2001 From: titima15 Date: Tue, 20 Dec 2022 21:15:50 +0000 Subject: [PATCH] fixed plugin for catalog upload --- .../Stock/ParseUpload/Plugin/CatalogXLS.pm | 24 ++++++++++--------- mason/order/edit_catalog_details_dialog.mas | 14 +++++------ mason/order/upload_catalog_items_dialog.mas | 10 ++++---- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/lib/CXGN/Stock/ParseUpload/Plugin/CatalogXLS.pm b/lib/CXGN/Stock/ParseUpload/Plugin/CatalogXLS.pm index a64d798418..8830a5f16f 100644 --- a/lib/CXGN/Stock/ParseUpload/Plugin/CatalogXLS.pm +++ b/lib/CXGN/Stock/ParseUpload/Plugin/CatalogXLS.pm @@ -35,14 +35,19 @@ sub _validate_with_plugin { my %supported_types; my %supported_categories; my %supported_material_sources; - my %supported_availability; + my %supported_material_types; $supported_types{'single item'} = 1; $supported_types{'set of items'} = 1; -# $supported_categories{'released variety'} = 1; -# $supported_categories{'pathogen assay'} = 1; -# $supported_categories{'control'} = 1; + $supported_categories{'released variety'} = 1; + $supported_categories{'pathogen assay'} = 1; + $supported_categories{'control'} = 1; + $supported_categories{'transgenic line'} = 1; + + $supported_material_types{'seed'} = 1; + $supported_material_types{'plant'} = 1; + $supported_material_types{'construct'} = 1; # $supported_material_sources{'OrderingSystemTest'} = 1; # $supported_material_sources{'Sendusu'} = 1; @@ -203,19 +208,16 @@ sub _validate_with_plugin { if (!$material_type || $material_type eq '') { push @error_messages, "Cell C$row_name: material_type missing"; + } elsif (!$supported_material_types{$material_type}) { + push @error_messages, "Cell C$row_name: material type is not supported: $material_type"; } if (!$category || $category eq '') { push @error_messages, "Cell D$row_name: category missing"; + } elsif (!$supported_categories{$category}) { + push @error_messages, "Cell C$row_name: category is not supported: $category"; } -# } elsif (!$supported_categories{$category}) { -# push @error_messages, "Cell C$row_name: category is not supported: $category"; -# } -# if (!$description || $description eq '') { -# push @error_messages, "Cell D$row_name: description missing"; -# } - # if (!$material_source || $material_source eq '') { # push @error_messages, "Cell E$row_name: material_source missing"; # } elsif (!$supported_material_sources{$material_source}) { diff --git a/mason/order/edit_catalog_details_dialog.mas b/mason/order/edit_catalog_details_dialog.mas index ee9d0f8f37..040068b5ec 100644 --- a/mason/order/edit_catalog_details_dialog.mas +++ b/mason/order/edit_catalog_details_dialog.mas @@ -64,9 +64,9 @@ $item_prop_id
@@ -76,10 +76,10 @@ $item_prop_id
diff --git a/mason/order/upload_catalog_items_dialog.mas b/mason/order/upload_catalog_items_dialog.mas index 0a76a04679..8b8e9ca81e 100644 --- a/mason/order/upload_catalog_items_dialog.mas +++ b/mason/order/upload_catalog_items_dialog.mas @@ -94,6 +94,8 @@
Header:
+ The first row (header) must contain the following: +
@@ -112,10 +114,10 @@