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

4311 - Missing display name fix #4363

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

WillNigel23
Copy link
Collaborator

The fix works in 2 parts:

We update the callback update_display_name to set real_name and display_name to nil in case the string value is blank. This will prevent new records with ' ' display_name values from being created.

Second is we update the display_name override to detect [:display_name] presence, otherwise use login. This will help us so that we don't need to do a migration to fix bad data

@WillNigel23 WillNigel23 linked an issue Sep 30, 2024 that may be closed by this pull request
Copy link
Collaborator

@saracarl saracarl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, but it doesn't address what I suspect is the real cause of owner names being blank, which is the redirect to a different view when you encounter an error creating your trial account.

If you get errors sign up here (users/new_trial):
signup

You get redirected to here (users):
redirect

@WillNigel23
Copy link
Collaborator Author

Owner names being saved in db as blank does not have much impact.

As long as real_name is set to something blank (i.e: nil, " " empty string, etc), we will be using 'self[:login]' which is always true.

At the end of the day, we save as nil if it is blank (which is the callback fix here).

@WillNigel23
Copy link
Collaborator Author

On the redirect part, this seems like a separate bug if there are sign up errors in new_trial that redirects to a different sign up form route.

when :free_trial
render :new_trial
else
render :new
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If in case we add more registration_type, we can easily add it here

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.

missing display name for trial owners
2 participants