Can I prevent firstname, lastname guessing?

Infos:

  • Used Zammad version: 6.4.1
  • Used Zammad installation type: docker-compose
  • Operating system: Ubuntu 24.04
  • Browser + version: Any

Expected behavior:

  • Setting last name to blank results in a blank last name.

Actual behavior:

  • If the first name has more than one token, it will be split using space as a delimiter and the second token will be used for the last name.

Steps to reproduce the behavior:

  • Create a user with the first name John Smith and a blank last name. The resulting user will have first name John and last name Smith.

Details

I’m trying to import an existing list of customers, but the source data is a mix of company names and individual name (ie: fistname, lastname). For any company names, I want to put the value in the firstname field and leave the lastname field blank. I only have a company name and not a primary contact person, so I can’t create an organization with an associated contact.

However, the lastname field is always populated with everything that’s after the first space in the firstname field. I believe the behaviour is part of the user model. I don’t see any conditional logic in that model that makes me think there’s any way to bypass the behaviour, but I’ve never used Rails so maybe I’m wrong.

I know that having a blank lastname should be ok because if I create a user with the firstname John and a blank lastname, the lastname will be blank (“”) in the database. I checked this via the rails console.

I suppose I could use a placeholder value or character as a workaround, but my reasoning for wanting a blank lastname is that it’s a consistent convention that doesn’t impact the display of customer names. For example, ABC Inc. looks better than something like ABC Inc. None.

Is there a better way of handling customers where I only have a company name for the contact info?

I would appreciate any tips / advice anyone is willing to offer.

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.