rt icon indicating copy to clipboard operation
rt copied to clipboard

Keep the Owner when using SelectOwnerAutocomplete

Open INCIBE-CERT opened this issue 2 years ago • 2 comments

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.

INCIBE-CERT avatar May 09 '22 16:05 INCIBE-CERT

if ( $Default and not $Default =~ /\D/ ) {

Maybe update the former condition to handle Name there? i.e.

if ( $Default ) {

-sunnavy

sunnavy avatar Jul 29 '22 21:07 sunnavy

Hi sunnavy!

If it already knows the name, it doesn't really need to do the $user->Load($Default); to fetch it, but User::Load would end up doing a $self->LoadByCol( "Name", $identifier ); so it should work as well. I have no special preference.

INCIBE-CERT avatar Jul 29 '22 22:07 INCIBE-CERT