Edgewall Software
Modify

Opened 12 years ago

Closed 8 years ago

#2178 closed enhancement (duplicate)

Show users' name instead of username (login) in ticket's owner field

Reported by: dserodio@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: devel
Severity: normal Keywords:
Cc: vyt@…, dserodio@…, mat@…, yotta@…, trac@…, a.a.vykhodtsev@…
Release Notes:
API Changes:

Description

My users asked me if it was possible to show the user's name (real name) instead of the username (login) in the 'Assign to' drop-down, so I implemented this feature.

It works like this:

  • If the value of the restrict_owner setting in TracIni is true or username, it shows the username, which is the current behaviour;
  • If the value of the restrict_owner setting in TracIni is name and the user's name is known, the user's name is shown.

Attachments (3)

trac-owner-show-name.patch (1015 bytes ) - added by dserodio@… 12 years ago.
Patch against r2322
trac-r2353.fix-2178-and-2063.diff (7.7 KB ) - added by dserodio@… 12 years ago.
New patch, replaces the previous one
trac-r2353.fix-2178-and-2063-v2.diff (6.7 KB ) - added by dserodio@… 12 years ago.
Sorry, the previous patch had some "leftovers"

Download all attachments as: .zip

Change History (16)

Changed 12 years ago by dserodio@…

Attachment: trac-owner-show-name.patch added

Patch against r2322

comment:1 Changed 12 years ago by vyt@…

Cc: vyt@… added

IMHO, username also should be available in selection, for example as:

Name (username)

comment:2 Changed 12 years ago by zgantar@…

This patch breaks notification!!'''

Stil working on patch for this patch. If anybody finds solution for this problem sooner, please post it here!

comment:3 Changed 12 years ago by anonymous

I think I fixed it! At source:/trunk/trac/Notify.py@2333#L85 change username with name! It works for me, as far as I tested it!

comment:4 Changed 12 years ago by dserodio@…

Cc: dserodio@… added

Sorry for jumping the gun on this, I didn't test notification before submitting this patch.
Digging deeper, I found that the <select> fields didn't have a value attribute (#2063), so the "label" (show to the user) has to be the same as the "value" (foreign key to the selected entity).

So I implemented a fix for both this ticket and #2063, but it's a much more "intrusive" change, if anyone wants to help me test it, I'd be thankful.

I also implemented your sugestion, so if restrict_owners=name+username, User's Name (username) is shown.

PS: Should I accept this ticket, or should only "comitters" accept tickets?

Changed 12 years ago by dserodio@…

New patch, replaces the previous one

Changed 12 years ago by dserodio@…

Sorry, the previous patch had some "leftovers"

comment:5 Changed 12 years ago by vyt@…

Danial, in your patch trac-r2353.fix-2178-and-2063-v2.diff exist mistype, templates/ticket.cs (for line 197):

<?cs var option:value ?>

Now this patch is huge for me, since I have already some modifications of code for translation.

Please update patch against trac-0.9 release and I'll try it again.

comment:6 Changed 12 years ago by vyt@…

Sorry, s/Danial/Daniel/ :)

comment:7 Changed 12 years ago by Christian Boos

Milestone: 0.12

Might be considered for milestone:0.12

comment:8 Changed 12 years ago by Emmanuel Blot

I think it would be worth waiting for the IUserDirectory implementation.

comment:9 Changed 12 years ago by anonymous

Cc: mat@… added

comment:10 Changed 12 years ago by anonymous

Cc: yotta@… added

comment:11 Changed 10 years ago by trac@…

Cc: trac@… added

comment:12 Changed 9 years ago by a.a.vykhodtsev@…

Cc: a.a.vykhodtsev@… added

comment:13 Changed 8 years ago by Christian Boos

Milestone: 0.13
Resolution: duplicate
Status: newclosed

Superseded by #7339.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .

 
Note: See TracTickets for help on using tickets.