Skip to content

Commit

Permalink
Bug 1926574 - When changing product of a bug and the destination prod…
Browse files Browse the repository at this point in the history
…uct only has one component, pre-select the one component
  • Loading branch information
dklawren committed Oct 28, 2024
1 parent 81d854d commit 88deb0d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extensions/BugModal/lib/WebService.pm
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ sub new_product {
# identical component in both products
$component->{selected} = $true;
}
elsif (scalar @{$components} == 1) {
# New product has one component so preselect it
$components->[0]->{selected} = $true;
}
else {
# default to a blank value
unshift @$components, {name => '', selected => $true,};
Expand Down

0 comments on commit 88deb0d

Please sign in to comment.