From 2b7b31bda66b10299c01a06338c2eccb6812ade9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Gonz=C3=A1lez?= Date: Mon, 9 May 2022 18:25:03 +0200 Subject: [PATCH] Keep the Owner when using SelectOwnerAutocomplete When going through SelectOwnerAutocomplete, the load of a template on investigation launch passes the selected value in $Default as text, but SelectOwnerAutocomplete only handles the field as a numeric id. Just copying $Default to $value fixes the issue. --- share/html/Elements/SelectOwnerAutocomplete | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/html/Elements/SelectOwnerAutocomplete b/share/html/Elements/SelectOwnerAutocomplete index 2ffefdf2584..558975e5162 100644 --- a/share/html/Elements/SelectOwnerAutocomplete +++ b/share/html/Elements/SelectOwnerAutocomplete @@ -61,6 +61,8 @@ if ( $Default and not $Default =~ /\D/ ) { my $user = RT::User->new( $session{'CurrentUser'} ); $user->Load($Default); $value = $user->$ValueAttribute; +} elsif ( $Default ) { + $value = $Default; } elsif (defined $TicketObj) { $value = $TicketObj->OwnerObj->$ValueAttribute; }