From 774efdf832c3778a551080761e6f78bc3b2a84c4 Mon Sep 17 00:00:00 2001 From: timparsons Date: Thu, 22 Dec 2022 16:26:21 -0500 Subject: [PATCH 1/3] [BI-1683] allowing pedigree string to include an empty female parent (allows for germplasm to define male parent only) --- lib/CXGN/BrAPI/v2/Germplasm.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CXGN/BrAPI/v2/Germplasm.pm b/lib/CXGN/BrAPI/v2/Germplasm.pm index 2b7ec4265f..db31a81def 100644 --- a/lib/CXGN/BrAPI/v2/Germplasm.pm +++ b/lib/CXGN/BrAPI/v2/Germplasm.pm @@ -631,7 +631,7 @@ sub store { # Check if pedigree parents don't exist my $missing_parents = ''; foreach (@$pedigree_parents){ - if (exists($accessions_missing_hash{$_})){ + if (scalar($_) > 0 && exists($accessions_missing_hash{$_})){ $missing_parents = $missing_parents . $_ ."," ; } } @@ -704,7 +704,7 @@ sub store { } my $pedigree = $params->{pedigree} || undef; my $pedigree_array = _process_pedigree_string($pedigree); - my $mother = defined $pedigree_array && scalar(@$pedigree_array) > 0 ? @$pedigree_array[0] : undef; + my $mother = defined $pedigree_array && scalar(@$pedigree_array) > 0 && scalar(@$pedigree_array[0]) > 0 ? @$pedigree_array[0] : undef; my $father = defined $pedigree_array && scalar(@$pedigree_array) > 1 ? @$pedigree_array[1] : undef; my $synonyms = $params->{synonyms} || []; my @synonymNames; From 43242a5257b55f44e7c61aed4819fe336520126e Mon Sep 17 00:00:00 2001 From: Tim Parsons Date: Thu, 22 Dec 2022 16:44:12 -0500 Subject: [PATCH 2/3] Update test.yml --- .github/workflows/test.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f00f33509..10feeef5a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,10 +23,20 @@ jobs: uses: actions/checkout@v2 - name: Get breedbase_dockerfile + if: startsWith(steps.extract_branch.outputs.branch, 'feature/') || startsWith(steps.extract_branch.outputs.branch, 'bug/') uses: actions/checkout@master with: repository: Breeding-Insight/breedbase_dockerfile path: breedbase_dockerfile + ref: 'develop' + + - name: Get breedbase_dockerfile + if: startsWith(steps.extract_branch.outputs.branch, 'hotfix/') + uses: actions/checkout@master + with: + repository: Breeding-Insight/breedbase_dockerfile + path: breedbase_dockerfile + ref: 'master' - name: Get the submodules working-directory: ./breedbase_dockerfile From 27cedad59437ac7f46e730b5370328738f1ce0d4 Mon Sep 17 00:00:00 2001 From: timparsons Date: Tue, 3 Jan 2023 11:47:07 -0500 Subject: [PATCH 3/3] [BI-1683] Fixing mother parent not saving --- lib/CXGN/BrAPI/v2/Germplasm.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CXGN/BrAPI/v2/Germplasm.pm b/lib/CXGN/BrAPI/v2/Germplasm.pm index db31a81def..133eb537d7 100644 --- a/lib/CXGN/BrAPI/v2/Germplasm.pm +++ b/lib/CXGN/BrAPI/v2/Germplasm.pm @@ -631,7 +631,7 @@ sub store { # Check if pedigree parents don't exist my $missing_parents = ''; foreach (@$pedigree_parents){ - if (scalar($_) > 0 && exists($accessions_missing_hash{$_})){ + if (length($_) > 0 && exists($accessions_missing_hash{$_})){ $missing_parents = $missing_parents . $_ ."," ; } } @@ -704,7 +704,7 @@ sub store { } my $pedigree = $params->{pedigree} || undef; my $pedigree_array = _process_pedigree_string($pedigree); - my $mother = defined $pedigree_array && scalar(@$pedigree_array) > 0 && scalar(@$pedigree_array[0]) > 0 ? @$pedigree_array[0] : undef; + my $mother = defined $pedigree_array && scalar(@$pedigree_array) > 0 && length(@$pedigree_array[0]) > 0 ? @$pedigree_array[0] : undef; my $father = defined $pedigree_array && scalar(@$pedigree_array) > 1 ? @$pedigree_array[1] : undef; my $synonyms = $params->{synonyms} || []; my @synonymNames;