Edgewall Software

Ticket #7339 (new enhancement)

Opened 5 months ago

Last modified 4 months ago

[Patch] Display full user names instead of user login

Reported by: michael.grundberg@… Owned by:
Priority: normal Milestone: 0.13
Component: general Version: 0.11rc2
Severity: normal Keywords: username
Cc:

Description

In some environments the user login names are cryptic since they are set by a central IT department using some number system or what else. It would be preferable to have trac display the full user names wherever possible so there is a fair chance to know who changed what.

Attached is a patch against the released version of 0.11rc2 which will display the full user names in all places which uses the Chrome.format_author function, if the user has set it in the preferences and the administrator has turned it on in the configuration. I also added the use of format_author in the assign to field of tickets, if it is configured to display a drop down list.

All existing tests run, but I did not create any new tests for this enhancement.

This patch might collide with ticket 2178.

Attachments

trac-show_full_names.diff (4.0 KB) - added by michael.grundberg@… 5 months ago.

Change History

Changed 5 months ago by michael.grundberg@…

Changed 5 months ago by ebray <hyugaricdeau@…>

I'm definitely +1 for this.

Changed 4 months ago by anonymous

I would definitely like see this rolled into the main trunk!

Changed 4 months ago by cboos

  • keywords username added
  • owner jonas deleted
  • milestone set to 0.13

This looks interesting, but calling env.get_known_users is costly. So for one this should only be done if the show_full_names option is selected. Then, caching that information in the Chrome instance is not a good idea since there's currently no way to get notified when this information changes. Recomputing the cache in each format_author makes the cache useless and is of course too costly. One interim solution might be to cache it in the req.

A better solution should be found as part of the user API changes, planned for 0.13. I'm rescheduling this for 0.13, but feel free to propose an interim patch taking the ideas above (or better ones) into account.

Changed 4 months ago by ebray <hyugaricdeau@…>

cboos: Are any of your ideas for the user/group API documented, or is it just in your head for now? I'd be interested in talking about that at some point as I've done a bit of work related to that. I have a plugin that provides users and user meta data from an external DB, and monkey patches env.get_known_users among other things. But its current incarnation is kind of ugly, so I'd be interested in what your thoughts are on the subject.

Changed 4 months ago by cboos

Sorry, not even in my head, I was referring to various ideas floating around (see #2456) and the fact that there's a general agreement that some improvement is needed in this area and that it should happen hopefully not later than 0.13...

Add/Change #7339 ([Patch] Display full user names instead of user login)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from (none). Next status will be 'new'
The owner will change from (none) to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.