human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

Do not save a default name to the database

Open awwaiid opened this issue 2 years ago • 2 comments

Summary

We should not be saving "Name Not Provided" to the database. From a model perspective that doesn't make a lot of sense. Now we're complicating the workflow by having some names as blank, some as nil and some as "Name Not Provided".

Things to consider

There might be other user variable that display the user, all of them need to use display_name instead.

  • @user.name
  • user.name
  • current_user.name
  • main_user.name
  • etc

Criteria for Completion

  • [ ] Change the name column to allow nulls and change the default to null
  • [ ] Do a mass update of all users with name Name Not Provided to replace with null.
  • [ ] Add a display_name to the User model that returns the name or Name Not Provided if it's null
  • [ ] Update all instances of displaying user.name to user.display_name

awwaiid avatar Feb 11 '24 16:02 awwaiid

@cancelei this might be a good follow-up for you on #4066

awwaiid avatar Feb 11 '24 16:02 awwaiid

I can take it! Thanks @awwaiid !

Edit: Will work on it in the next few days.

cancelei avatar Feb 11 '24 16:02 cancelei

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

github-actions[bot] avatar Mar 18 '24 00:03 github-actions[bot]

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Mar 26 '24 00:03 github-actions[bot]

We are still working on getting this reviewed.

cielf avatar Mar 26 '24 01:03 cielf