WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@INCIBE-CERT
Copy link

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.

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.
@sunnavy
Copy link
Member

sunnavy commented Jul 29, 2022

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

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

if ( $Default ) {

-sunnavy

@INCIBE-CERT
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants