From 5d1846b16d9ae832a32c9078ce73a87231326eb8 Mon Sep 17 00:00:00 2001 From: shbrainard Date: Thu, 21 May 2026 11:52:41 -0400 Subject: [PATCH] BrAPI: fix PUT /trials response returning trialName in trialDescription The update handler used $folder->name to populate trialDescription in the response, with a comment that description was not accessible from the Folder object. The database write at line 322 was correct; only the response payload was wrong. Read the description from the project row instead. --- lib/CXGN/BrAPI/v2/Trials.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CXGN/BrAPI/v2/Trials.pm b/lib/CXGN/BrAPI/v2/Trials.pm index faf2f4ec26..2c9295bf53 100644 --- a/lib/CXGN/BrAPI/v2/Trials.pm +++ b/lib/CXGN/BrAPI/v2/Trials.pm @@ -351,7 +351,7 @@ sub update { my @folder_studies; my %additional_info; my $folder_id = $folder->folder_id; - my $folder_description = $folder->name; #description doesn't exist + my $folder_description = $self->bcs_schema->resultset('Project::Project')->find({ project_id => $folder_id })->description() // ''; my $breeding_program_id = $folder->breeding_program->project_id(); # external references