In the form element Add related entity select box has only labels of the fields. This is confusing in situation when there are several fields with the same label (in my case it happens with taxonomy fields where for different content types fields have same name Tags or Category). I would like to propose to add field name in brackets. This will help to understand what field we add to the list.

Comments

ygerasimov’s picture

Status: Active » Needs review
StatusFileSize
new894 bytes

patch attached

drunken monkey’s picture

Title: Index fields. Add related entity. » Add machine names to "related entities" list
StatusFileSize
new1.09 KB

I'm not fully convinced that bloating the labels in such a way really makes sense. For one thing, you'll have the same problem afterwards (and on several other places), if you add the fields for both related entities. So usually the best practice will probably be not to give the same name to different fields in the first place. (Although I understand that it makes sense sometimes — I also had this case once.)
Also, machine names are unnecessary for the majority of fields that have different names. Therefore, showing them for all fields is kind of overkill.

How about the attached patch, showing the machine names only when two options would otherwise have the same label? That's one I could live with. (OK, I could live with yours, too, but I prefer a minimal-invasion approach.)

ygerasimov’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.53 KB

Yes your patch is nicer. I added some comments.

drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.