From 822e56a4d8d7592cef141c09c27c4d912ccbd933 Mon Sep 17 00:00:00 2001 From: bellerbrock Date: Thu, 20 Jan 2022 11:05:46 -0500 Subject: [PATCH] add missing trial upload dialog RRC design code --- .../Trial/ParseUpload/Plugin/MultipleTrialDesignExcelFormat.pm | 7 ++++--- lib/CXGN/Trial/TrialDesignStore/PhenotypingTrial.pm | 4 ++-- lib/SGN/Controller/AJAX/Trial.pm | 2 +- mason/breeders_toolbox/trial/trial_upload_dialogs.mas | 4 +++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/CXGN/Trial/ParseUpload/Plugin/MultipleTrialDesignExcelFormat.pm b/lib/CXGN/Trial/ParseUpload/Plugin/MultipleTrialDesignExcelFormat.pm index 8c5a5b154..cecaffb22 100644 --- a/lib/CXGN/Trial/ParseUpload/Plugin/MultipleTrialDesignExcelFormat.pm +++ b/lib/CXGN/Trial/ParseUpload/Plugin/MultipleTrialDesignExcelFormat.pm @@ -468,6 +468,7 @@ sub _validate_with_plugin { my %valid_design_types = ( "CRD" => 1, "RCBD" => 1, + "RRC" => 1, "Alpha" => 1, "Lattice" => 1, "Augmented" => 1, @@ -517,13 +518,13 @@ sub _validate_with_plugin { @accessions = grep !/$matched_synonym/, @accessions; push @accessions, $found_acc_name_from_synonym; } - + #now validate again the accession names $accessions_hashref = $validator->validate($schema,'accessions',\@accessions); - + my @accessions_missing = @{$accessions_hashref->{'missing'}}; my @multiple_synonyms = @{$accessions_hashref->{'multiple_synonyms'}}; - + if (scalar(@accessions_missing) > 0) { # $errors{'missing_accessions'} = \@accessions_missing; push @error_messages, "Accession(s) ".join(',',@accessions_missing)." are not in the database as uniquenames or synonyms."; diff --git a/lib/CXGN/Trial/TrialDesignStore/PhenotypingTrial.pm b/lib/CXGN/Trial/TrialDesignStore/PhenotypingTrial.pm index dac6427bc..6a2898ca3 100644 --- a/lib/CXGN/Trial/TrialDesignStore/PhenotypingTrial.pm +++ b/lib/CXGN/Trial/TrialDesignStore/PhenotypingTrial.pm @@ -51,8 +51,8 @@ sub validate_design { my $error = ''; if (defined $design_type){ - if ($design_type ne 'CRD' && $design_type ne 'Alpha' && $design_type ne 'MAD' && $design_type ne 'Lattice' && $design_type ne 'Augmented' && $design_type ne 'RCBD' && $design_type ne 'RCD' && $design_type ne 'p-rep' && $design_type ne 'splitplot' && $design_type ne 'greenhouse' && $design_type ne 'Westcott' && $design_type ne 'Analysis'){ - $error .= "Design $design_type type must be either: CRD, Alpha, Augmented, Lattice, RCBD, RCD, MAD, p-rep, greenhouse, Westcott or splitplot"; + if ($design_type ne 'CRD' && $design_type ne 'Alpha' && $design_type ne 'MAD' && $design_type ne 'Lattice' && $design_type ne 'Augmented' && $design_type ne 'RCBD' && $design_type ne 'RRC' && $design_type ne 'p-rep' && $design_type ne 'splitplot' && $design_type ne 'greenhouse' && $design_type ne 'Westcott' && $design_type ne 'Analysis'){ + $error .= "Design $design_type type must be either: CRD, Alpha, Augmented, Lattice, RCBD, RRC, MAD, p-rep, greenhouse, Westcott or splitplot"; return $error; } } diff --git a/lib/SGN/Controller/AJAX/Trial.pm b/lib/SGN/Controller/AJAX/Trial.pm index ef61e2419..8e733a8a9 100644 --- a/lib/SGN/Controller/AJAX/Trial.pm +++ b/lib/SGN/Controller/AJAX/Trial.pm @@ -184,7 +184,7 @@ sub generate_experimental_design_POST : Args(0) { my $use_same_layout = $c->req->param('use_same_layout'); my $number_of_checks = scalar(@control_names_crbd); - if ($design_type eq "RCBD" || $design_type eq "RCD" || $design_type eq "Alpha" || $design_type eq "CRD" || $design_type eq "Lattice") { + if ($design_type eq "RCBD" || $design_type eq "RRC" || $design_type eq "Alpha" || $design_type eq "CRD" || $design_type eq "Lattice") { if (@control_names_crbd) { @stock_names = (@stock_names, @control_names_crbd); } diff --git a/mason/breeders_toolbox/trial/trial_upload_dialogs.mas b/mason/breeders_toolbox/trial/trial_upload_dialogs.mas index 0fc3e5c77..8c2e81615 100644 --- a/mason/breeders_toolbox/trial/trial_upload_dialogs.mas +++ b/mason/breeders_toolbox/trial/trial_upload_dialogs.mas @@ -258,7 +258,7 @@ $design_types => ()
- +

Creates plant entries for each plot. Ignore if not adding plant entries.

@@ -295,6 +295,8 @@ $design_types => () % $method = 'CRD'; % } elsif ($type eq 'Complete Block'){ % $method = 'RCBD'; +% } elsif ($type eq 'Resolvable Row-Column'){ +% $method = 'RRC'; % } elsif ($type eq 'Alpha Lattice'){ % $method = 'Alpha'; % } elsif ($type eq 'Modified Augmented Design'){ -- 2.11.4.GIT