Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep the Owner when using SelectOwnerAutocomplete #328

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from

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
2 participants