Page MenuHomePhabricator

Understand difference between author_name and name in gerrit
Closed, ResolvedPublic


As this is slightly relevant when constructing search queries for stats.

e.g. from in the gerrit index :

author_name	   	Sam Reed
author_user_name	   	reedy
name	   	Reedy

Seeing e.g. , Reedy is used.

Looking at the DB dump,

  • as the profile name, Sam Reed is set.
  • as the gerrit username, it is sometimes reedy and sometimes null and sometimes an empty string.
  • as the gerrit name, it is sometimes Reedy and sometimes Sam Reed

Event Timeline

Don't think I can find out myself:

$:acko\> grep -r user_name --exclude="*.json" .
./grimoirelab/panels/* author_user_name
./grimoirelab/sortinghat/sortinghat/parsing/                    "user_name": "John Smith",
./grimoirelab/sortinghat/sortinghat/parsing/                    "user_name": "John Doe",
./grimoirelab/sortinghat/sortinghat/parsing/                name = self.__encode(user['user_name'])
./grimoirelab/sortinghat/build/lib/sortinghat/parsing/                    "user_name": "John Smith",
./grimoirelab/sortinghat/build/lib/sortinghat/parsing/                    "user_name": "John Doe",
./grimoirelab/sortinghat/build/lib/sortinghat/parsing/                name = self.__encode(user['user_name'])
./grimoirelab/GrimoireELK/grimoire_elk/elk/            rich_issue['user_name'] = user['name']
./grimoirelab/GrimoireELK/grimoire_elk/elk/            rich_issue['user_name'] = None
./grimoirelab/GrimoireELK/grimoire_elk/elk/            rol+"_user_name": empty_field,
./grimoirelab/GrimoireELK/grimoire_elk/elk/            eitem_sh[rol+"_user_name"] = None
./grimoirelab/GrimoireELK/grimoire_elk/elk/                eitem_sh[rol+"_user_name"] = identity['username']
./grimoirelab/GrimoireELK/grimoire_elk/elk/            eitem_sh[rol+"_user_name"] = identity['username']

which probably turns this into an upstream documentation request.

Comparison of the three values on the front page:

Aklapper closed this task as Resolved.Dec 6 2017, 5:36 PM
Aklapper moved this task from Backlog to December on the Developer-Advocacy (Oct-Dec 2017) board.

author_name is the global field name; the other two names are data source specific.
I covered this in (for me and others).

Closing task as resolved.

Qgil awarded a token.Dec 7 2017, 11:42 AM