Edgewall Software
Modify

Opened 11 years ago

Closed 4 years ago

Last modified 3 years ago

#7339 closed enhancement (fixed)

[Patch] Display full user names instead of user login

Reported by: michael.grundberg@… Owned by: Ryan J Ollos
Priority: high Milestone: 1.2
Component: general Version: 0.11.5
Severity: normal Keywords: username user review
Cc: mian.hasan.khalil@…, itamarost@…, Thijs Triemstra, macke@…, osimons, Steffen Hoffmann, leho@…, martin.prikryl@…, franz.mayer@…, sterkrig@…, locher.hanspeter@…, boris.savelev@…, benco@…, djones@…, arkinform@…, ober.sebastian@…, fcorreia@…, Ryan J Ollos, trac@…, jared.bownds@…, tadas.kazlauskas@…, Jun Omae, Adam.Howell@… Branch:
Release Notes:

Usernames are replaced with full names when [trac] show_full_names is true and the full name has been set in the user's preferences.

API Changes:
  • Environment.get_known_users returns a dictionary mapping username to a tuple with full name and email address when the keyword argument as_dict is True (defaults to False).
  • TicketSystem.eventually_restrict_owner doesn't append < default > to the top of the list of allowed owners.
  • The is_obfuscated function, added to trac.util.text, returns True if the word contains the email obfuscation character. The function is available in templates.

Description (last modified by Ryan J Ollos)

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 (12)

trac-show_full_names.diff (4.0 KB ) - added by michael.grundberg@… 11 years ago.
trac-show_full_names-r2-0.11.5.diff (6.3 KB ) - added by Matthew Caron <Matt.Caron@…> 10 years ago.
Show full names rev 2. (against trac 0.11.5)
trac-show_full_names-r3-0.11.5.diff (8.5 KB ) - added by Hasan Khalil <mian.hasan.khalil@…> 10 years ago.
Show full names revision 3.
trac-show_full_names-r4-0.11.6.patch (9.4 KB ) - added by Vaclav Slavik <vslavik@…> 9 years ago.
trac-show_full_names-r0-0.12b1.diff (7.4 KB ) - added by KlauX 9 years ago.
Patch for Trac 0.12b1
Trac-show_full_names-r1-0.12.diff (7.7 KB ) - added by KlauX <klaux1@…> 9 years ago.
Revision 1 plus alterations…
Trac-show_full_names-r1-0.12.2.diff (7.5 KB ) - added by KlauX <klaux1@…> 9 years ago.
Revision 1 plus alterations…
Trac-show_full_names-r2-0.12.2.patch (12.5 KB ) - added by Poly <polyflor@…> 8 years ago.
Repaired, tested and enhanced patch for 0.12.2
Trac-show_full_names-r3-0.12.2.patch (12.1 KB ) - added by Poly <polyflor@…> 8 years ago.
interim patch (rev3) for 0.12.2
Trac-show_full_names-r4-0.12.2.patch (14.4 KB ) - added by Hans-Peter Locher <locher.hanspeter@…> 7 years ago.
improved (rev3 + invalidation of cached known_users) patch for 0.12.2
Trac-show_full_names-sorted-r4-0.12.2.patch (14.4 KB ) - added by rainer.hihn@… 6 years ago.
Extended Patch to sort Full Names alphabetically
Trac-show_full_names-sorted-r4-1.0.1.diff (14.9 KB ) - added by markus.koechy@… 5 years ago.

Download all attachments as: .zip

Change History (137)

by michael.grundberg@…, 11 years ago

Attachment: trac-show_full_names.diff added

comment:1 by ebray <hyugaricdeau@…>, 11 years ago

I'm definitely +1 for this.

comment:2 by anonymous, 11 years ago

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

comment:3 by Christian Boos, 11 years ago

Keywords: username added
Milestone: 0.13
Owner: Jonas Borgström removed

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.

comment:4 by ebray <hyugaricdeau@…>, 11 years ago

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.

comment:5 by Christian Boos, 11 years ago

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…

comment:6 by Christian Boos, 10 years ago

#2178 asked for the full name in one specific location, so I closed it as duplicate.

See also #3737, which discusses a complementary idea (showing nicknames).

comment:7 by dserodio@…, 10 years ago

Cc: dserodio@… added

Couldn't the "create user" WebAdmin function invalidate the cache?

PS.: Why doesn't the spam filter let me post?

comment:8 by Matthew Caron <Matt.Caron@…>, 10 years ago

I have attached an updated patch against trac 0.11.5. It expands on Michael's patch, munges it in to 0.11.5 so it (should) apply cleanly, and adds lookups in a couple of spots (ticket queries, etc.) which were missed.

by Matthew Caron <Matt.Caron@…>, 10 years ago

Show full names rev 2. (against trac 0.11.5)

comment:9 by mian.hasan.khalil@…, 10 years ago

Cc: mian.hasan.khalil@… added

Another vote for seeing something like this integrated to the trunk.

by Hasan Khalil <mian.hasan.khalil@…>, 10 years ago

Show full names revision 3.

comment:10 by Hasan Khalil <mian.hasan.khalil@…>, 10 years ago

I've added a patch for another couple of cases that were missed. There are definitely more in notification.py but I wasn't able to get it to play nice. I haven't really ever used python before, so do audit that code before you run it locally! I'd love to see someone else pick up where I left off with notification.py and finish the job. That seems to be really the only other place that e-mail obfuscation occurs instead of substituting with full names.

in reply to:  3 ; comment:11 by Hasan Khalil <mian.hasan.khalil@…>, 10 years ago

Version: 0.11rc20.11.5

Replying to cboos:

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.

Fixed in attachment:trac-show_full_names-r3-0.11.5.diff.

comment:12 by Vaclav Slavik <vslavik@…>, 10 years ago

Cc: vslavik@… added

in reply to:  11 ; comment:13 by Christian Boos, 10 years ago

Replying to Hasan Khalil <mian.hasan.khalil@…>:

Replying to cboos:

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.

Fixed in attachment:trac-show_full_names-r3-0.11.5.diff.

Thanks! Patch looks good, you're on the right track ;-) Still:

  • trac/ticket/web_ui.py, in old = chrome. chrome is not defined here. A bit of refactoring is needed here so that there's only one chrome = Chrome(self.env) in this method;
  • The docstring for show_full_names should add a caveat saying: "This option is potentially resource intensive for sites with lots of users." (or anything better phrased);
  • Finally, Chrome.user_map is caching some data coming from the database, and as such its content should be adequately updated when needed. This can be achieved using the cached attributes we introduced in 0.12. Some work should be done in order to find the proper places where the cache has to be invalidated.

in reply to:  13 comment:14 by dekimsey@…, 9 years ago

Replying to cboos:

  • Finally, Chrome.user_map is caching some data coming from the database, and as such its content should be adequately updated when needed. This can be achieved using the cached attributes we introduced in 0.12. Some work should be done in order to find the proper places where the cache has to be invalidated.

If a user's information is updated, persistent-processes will not pickup on the new information until they are reloaded. This is because the user_map is generated in env as cboos has noted. The hacky solution is to simply touch the trac.ini file to force it to reload.

by Vaclav Slavik <vslavik@…>, 9 years ago

comment:15 by Vaclav Slavik <vslavik@…>, 9 years ago

I'm attaching modified version of the patch. Changes:

  1. Fixed trac/ticket/web_ui.py problem. Chrome(self.env) is relatively cheap, so I just added it at the beginning of the function.
  2. Docstring fixed.
  3. Changed to show full name even to anonymous requests. Previously, show_full_names meant "show full names to users that would otherwise be shown unmangled email address", I think it makes more sense like this.
  4. If showing email address is permitted, display Full Name <email@address.com> instead of Full Name. This is consistent with the way email addresses of unauthenticated users are shown by Trac. More importantly, it wouldn't be possible to contact registered submitters without this change.

I'm not sure if 4. is the right thing to do. Ideally, user names would be clickable links (either mailto: or using e.g. reCAPTCHA Mailhide), but that would be a huge change out of this patch's scope.

I didn't port the patch to 0.12 and its caching framework yet.

comment:16 by Christian Boos, 9 years ago

See also #9115 (focusing on the CC: field, closed as duplicate of the present ticket) and #3737 (alternative display of a 'nickname').

by KlauX, 9 years ago

Patch for Trac 0.12b1

in reply to:  15 comment:17 by KlauX <klaux1@…>, 9 years ago

Replying to Vaclav Slavik <vslavik@…>:

I'm attaching modified version of the patch. Changes: […]

This patch is upside down?

Last edited 4 years ago by Ryan J Ollos (previous) (diff)

by KlauX <klaux1@…>, 9 years ago

Revision 1 plus alterations…

by KlauX <klaux1@…>, 9 years ago

Revision 1 plus alterations…

comment:18 by Christian Boos, 9 years ago

Keywords: review added

comment:19 by Itamar Ostricher, 9 years ago

Cc: itamarost@… added
Keywords: user added

comment:20 by lkraav <leho@…>, 9 years ago

Cc: leho@… added

comment:21 by alexander.papaspyrou@…, 9 years ago

Cc: alexander.papaspyrou@… added

comment:22 by Thijs Triemstra, 9 years ago

Cc: Thijs Triemstra added

Patch needs a review.

comment:23 by Thijs Triemstra, 9 years ago

Priority: normalhigh

Increasing the priority of this enhancement, judging by the cc's.

comment:24 by Marcus Lindblom <macke@…>, 9 years ago

Cc: macke@… added

comment:25 by ajax, 8 years ago

This patch doesnt work with TRAC 0.12.2rc1

comment:26 by anonymous, 8 years ago

I could not patch version 0.12.2. The diff failed in three places. I rolled back to 0.12 and ran the diff and everything patched fine. I added the show_full_names under the [trac] directive in the trac.ini and made sure that my full name was filled in under preferences but I cannot get this to work. Is there any other changes I need to make to implement this? Also I am running this under ubuntu so am I supposed to patch the /usr/local/lib/python2.6/dist-packages/ version or the /usr/lib/python2.6/dist-packages. Sorry, I am kind of a noob when it comes to this. Thanks a lot.

comment:27 by Poly <polyflor@…>, 8 years ago

I am working on a working patch for 0.12.2. It should be postable by the end of this month.

by Poly <polyflor@…>, 8 years ago

Repaired, tested and enhanced patch for 0.12.2

comment:28 by Poly <polyflor@…>, 8 years ago

Find enclosed the patch for 0.12.2 (r2).

  • Fixed: works with 0.12.2
  • Added: Using a cached attribute for 'known_users' (as discussed above)
  • Added: Test cases for the global flags (show_email_addresses and show_full_names)
  • Added: Ticket Owner and Reporter are clickable when shown in full and point to the reporting page (same as in unpatched versions)
  • Open: Notification.py see comments above and also #7862

There is also an oddity I stumbled upon: If show_email_addresses is true and show_full_names is false the Reporter and Owner fields are shown as logins (as long as your logins do not contain an at-sign). This behaviour has been present ever since the show_email_addresses has been implemented. I did not touch this dial, because I do not know the intenion of the flag for the Reporter and Owner field in this case. If you like other behaviour you should be able to adapt the format_author() method. Last but not least that is why I provided some test cases.

Hope this helps.

comment:29 by Christian Boos, 8 years ago

Thanks for the patch, looks like a good start. From a cursory look:

  • a few whitespace glitches in trac/web/chrome.py
  • about know_users cached property:
  • just use self.known_users no need for self._user_map (it's even wrong to do so, at the latter will never get invalidated, once set)
  • speaking of invalidation, this known_users property never gets invalidated, and this should at least be done in some session management operations (that's actually the difficult part and why further changes are needed until we can commit something like this)

comment:30 by osimons, 8 years ago

Cc: osimons added

comment:31 by Steffen Hoffmann, 8 years ago

Cc: Steffen Hoffmann added

by Poly <polyflor@…>, 8 years ago

interim patch (rev3) for 0.12.2

in reply to:  29 comment:32 by Poly <polyflor@…>, 8 years ago

Replying to cboos:

From a cursory look:

  • a few whitespace glitches in trac/web/chrome.py
  • about know_users cached property:

[…] Thanks for setting the right stage for the cached attribute. I addressed your tips in the r3-0.12.2 patch.

  • speaking of invalidation, this known_users property never gets invalidated, and this should at least be done in some session management operations (that's actually the difficult part and why further changes are needed until we can commit something like this)

I'd like to fix that too. I had a glance look in trac/web/session.py. I am not sure if this is the right (and the only) place to hook in the invalidation. This topic really needs more attention and time than I currently can provide. Some hints (if I am on the right track) could accelerate a solution for this. Thank you!

comment:33 by lkraav <leho@…>, 8 years ago

Cc: leho@… removed

comment:34 by lkraav <leho@…>, 8 years ago

Cc: leho@… added

comment:35 by taylor@…, 8 years ago

Cc: taylor@… added

comment:36 by Martin Přikryl <martin.prikryl@…>, 8 years ago

Cc: martin.prikryl@… added

comment:37 by Anton Bobov <bobov_a@…>, 8 years ago

Cc: bobov_a@… added

comment:38 by haircut@…, 7 years ago

Cc: haircut@… added

comment:39 by framay <franz.mayer@…>, 7 years ago

Cc: franz.mayer@… added

comment:40 by krigstask <sterkrig@…>, 7 years ago

Cc: sterkrig@… added

comment:41 by dserodio@…, 7 years ago

Cc: dserodio@… removed

in reply to:  3 ; comment:42 by framay <franz.mayer@…>, 7 years ago

Replying to cboos:

This looks interesting, but calling env.get_known_users is costly.

I am wondering, why Trac does not have any user table. A select * from user for example wouldn't probably that costly like env.get_known_users. Is there any ticket / request for a separate user table?

Furthermore all master data of users could be stored in that table, such as:

  • name and forename (like already stored in session_attribute)
  • email address (like already stored in session_attribute)
  • phone number(s)
  • room number
  • location (address)
  • department
  • some more personell information about that person (knowledge, photo, etc.)
  • etc.

Preference data could be stored as now in session_attribute.

in reply to:  42 comment:43 by lkraav <leho@…>, 7 years ago

Replying to framay <franz.mayer@…>:

Replying to cboos:

This looks interesting, but calling env.get_known_users is costly.

I am wondering, why Trac does not have any user table. A select * from user for example wouldn't probably that costly like env.get_known_users. Is there any ticket / request for a separate user table?

#2456 is an all-time classic :>

by Hans-Peter Locher <locher.hanspeter@…>, 7 years ago

improved (rev3 + invalidation of cached known_users) patch for 0.12.2

comment:44 by Hans-Peter Locher <locher.hanspeter@…>, 7 years ago

I've attached a new patch for Trac 12.2 with invalidation of the trac.web.chrome.Chrome.known_users

The invalidation works when changing the user attributes via trac-admin and when a user saves his prefs

in reply to:  44 ; comment:45 by Hans-Peter Locher <locher.hanspeter@…>, 7 years ago

comment:46 by Hans-Peter Locher <locher.hanspeter@…>, 7 years ago

Cc: locher.hanspeter@… added

comment:47 by mhait@…, 7 years ago

I`ve downloaded http://download.edgewall.org/trac/Trac-0.12.2.zip and failed to apply patch onto it (source code from Trac-0.12.2.zip really differs from patch version). What am I doing wrong?

comment:48 by Boris Savelev <boris.savelev@…>, 7 years ago

Cc: boris.savelev@… added

comment:49 by jan.zilka@…, 7 years ago

I upgraded Trac 0.12 patched by r3 to 0.13dev and show_full_names does not work.

All seems ok, lines from patch are in the 0.13 code. Any idea?

comment:50 by anonymous, 7 years ago

Patch works for 0.12.3, too :).

comment:51 by Ryan J Ollos <ryano@…>, 7 years ago

Cc: ryano@… added

in reply to:  44 ; comment:52 by anonymous, 7 years ago

Replying to Hans-Peter Locher <locher.hanspeter@…>:

I've attached a new patch for Trac 12.2 with invalidation of the trac.web.chrome.Chrome.known_users

The invalidation works when changing the user attributes via trac-admin and when a user saves his prefs

i'm using this patch but having an issue with email addresses

trac.ini is set to

show_email_addresses = false
show_full_names = true

but full_names and email_addresses are both shown. show_email_addresses appears to have no effect on my install (Trac 12.2.2, r4 patch).

am i missing a configuration trick? I would like full_name but no email to be displayed

Last edited 5 years ago by Ryan J Ollos (previous) (diff)

in reply to:  52 comment:53 by Ryan J Ollos <ryano@…>, 7 years ago

Replying to anonymous:

am i missing a configuration trick? I would like full_name but no email to be displayed

I'm not entirely sure these will have an effect in this case, but you should probably make sure your users don't have the EMAIL_VIEW permission, and that never_obfuscate_mailto is True.

comment:54 by jaz, 7 years ago

how about patch for 1.0 dev version? I have created one for 0.13 . I'd work on 1.0 but have no access to svn…

comment:55 by benco@…, 7 years ago

Cc: benco@… added

by rainer.hihn@…, 6 years ago

Extended Patch to sort Full Names alphabetically

in reply to:  45 comment:56 by rainer.hihn@…, 6 years ago

in reply to:  54 comment:57 by Chris.Nelson@…, 6 years ago

Replying to jaz:

how about patch for 1.0 dev version? I have created one for 0.13 . I'd work on 1.0 but have no access to svn…

How about just rolling this into the core? Is it controversial?

comment:58 by Christian Boos, 6 years ago

Last patch looks worth testing, but it would need to be ported to at least 1.0-stable first. If so, we'll review it more closely, test it (from the comments, I'm not sure if the problem mentioned in comment:52 was addressed), and it could possibly make it for 1.0.2.

comment:59 by djones@…, 6 years ago

Cc: djones@… added

The -sorted version is very welcome, since our userids to not sort in the same order as last names.

Would love to see this rolled to core. I am planning to move from 0.12 to 1.0, but do not want to lose the real-names functionality.

comment:60 by alexander.papaspyrou@…, 6 years ago

Cc: alexander.papaspyrou@… added

comment:61 by alexander.papaspyrou@…, 6 years ago

Cc: alexander.papaspyrou@… removed

comment:62 by alexander.papaspyrou@…, 6 years ago

Cc: alexander.papaspyrou@… removed

comment:63 by arkinform@…, 6 years ago

Cc: arkinform@… added

comment:64 by haircut@…, 6 years ago

Cc: haircut@… removed

comment:65 by ober.sebastian@…, 6 years ago

Cc: ober.sebastian@… added

comment:66 by fcorreia@…, 6 years ago

Cc: fcorreia@… added

comment:67 by trac@…, 6 years ago

Cc: trac@… added

comment:68 by Jaredbownds, 6 years ago

Are there any plans to support 1.0 with this feature?

comment:69 by Ryan J Ollos, 6 years ago

Cc: Ryan J Ollos added

comment:70 by Ryan J Ollos, 6 years ago

Cc: ryano@… removed

comment:71 by anonymous, 6 years ago

Is there any movement on this for 1.0?

comment:72 by trac@…, 6 years ago

Cc: trac@… added

comment:73 by Nikolaj Sjujskij <skrattaren@…>, 5 years ago

Cc: skrattaren@… added

comment:74 by anonymous, 5 years ago

I would really like to use this with my Trac 1.0.1 setup, is this possible?

comment:75 by Chris.Nelson@…, 5 years ago

I have a patch to 1.0.1. I'm surprised this has never been put into core.

comment:76 by anonymous, 5 years ago

I would also love to use this on 1.0.1. What's the recommended approach here?

comment:77 by anonymous, 5 years ago

Anything new here ? we want this in 1.0.1 also.

comment:78 by Ryan J Ollos, 5 years ago

Milestone: next-major-releases1.1.3

We can try to include this in 1.1.3.

by markus.koechy@…, 5 years ago

comment:79 by markus.koechy@…, 5 years ago

I applied the patch attachment:Trac-show_full_names-sorted-r4-0.12.2.patch to Trac 1.0.1 by hand and this is the resulting patch: attachment:Trac-show_full_names-sorted-r4-1.0.1.diff

comment:80 by Ryan J Ollos, 5 years ago

The patch from comment:79 applied somewhat cleanly to the trunk: log:rjollos.git:t7339.

in reply to:  80 comment:81 by Peter Suter, 5 years ago

Replying to rjollos:

The patch from comment:79 applied somewhat cleanly to the trunk:

There seem to be some problems in this patch:

  • x['label'] == 'Owner' only works for English.
    • Consider moving that sort-by-name logic into _prepare_fields after field['label'] = _("Owner")?
    • Or maybe even into TicketSystem.eventually_restrict_owner()?
  • operator.itemgetter(1)(v) sorts by the second letter in the name(?) (or throws if the name is too short for that)
    • Assuming we just want to sort by the result of format_author(), that entire block of code could be replaced by x['options'] = sorted(x['options'], key=partial(chrome.format_author, req))
  • The logic tests combining show_email_addresses and EMAIL_VIEW look wrong.
  • Cache invalidation might be required in _do_delete and promote_session?

log:rjollos.git:t7339.

I think you forgot to actually rename the definition of Chrome.invalidate_known_users() to Chrome.reset_known_users().

I would move that and the known_users cache to Environment instead, where we already have get_known_users(). And perhaps turn it around so the cached property _known_users is used locally in that method, similar to _all_permissions.

comment:82 by Ryan J Ollos, 5 years ago

Thanks for the suggestions. I didn't mean to imply that I thought the patch was ready. It'll be a few more weeks before I get to working on it so if anyone else want to move forward please feel free.

comment:83 by taylor@…, 5 years ago

Cc: taylor@… removed

comment:84 by Jared Bownds <jared.bownds@…>, 5 years ago

Cc: jared.bownds@… added

I too am interested in this patch.

comment:85 by Jared Bownds <jared.bownds@…>, 5 years ago

Are there any new updated on this patch?

comment:86 by tadas.kazlauskas@…, 5 years ago

Interested to get it fixed too.

comment:87 by Tadas Kazlauskas <tadas.kazlauskas@…>, 5 years ago

Cc: tadas.kazlauskas@… added

comment:88 by trac@…, 5 years ago

Cc: trac@… removed

comment:89 by anonymous, 5 years ago

+1

known_users really needs to be cached

comment:90 by Jared Bownds <jared.bownds@…>, 5 years ago

It would be good to have a timeline expectation for this patch. Implementing this ability will dramatically increase the adoption rate of Trac in large environments.

As an alternative, perhaps it's easier to display a users email address? Most times email addresses are more meaningful than a user name. Although, it sounds like the same mechanics may be involved.

Please let me know if you need my assistance with testing and feedback.

Best, Jared

comment:91 by Ryan J Ollos, 5 years ago

The timeline is a few months to get it on the trunk, then a preview development release to follow (milestone:1.1.3) and then finally it will be in a production-stable release, Trac 1.2, which will be released sometime next year I imagine. When one of the developers has time to work on it you will see activity in this ticket. All of the devs are volunteers on this project, and while we want to make Trac the most magnificent issue tracker in the world (and someday it will be), for the moment the reality of our day jobs limits us to only the waking moments away from our day jobs. Anyone is welcome to work on this ticket to move it along, there was good feedback on what needs to be done in comment:81 (see PatchWelcome and ThisTicketWasOpenedTenYearsAgo, and understand that the patch in this ticket needs to be improved). Thank you for your offer to test.

If you wish to show email addresses, you can try the show_email_addresses option in the [trac] section of trac.ini [TracIni#trac-section]. It may do what you want. I'm unsure.

comment:92 by Ryan J Ollos, 5 years ago

I see that Jun has posted a plugin just this week, th:UsernameDecoratePlugin, which implements this feature. Hopefully that will hold everyone over until this ticket is resolved.

comment:93 by Jun Omae, 5 years ago

Cc: Jun Omae added

comment:94 by bobov_a@…, 5 years ago

Cc: bobov_a@… removed

comment:95 by vslavik@…, 5 years ago

Cc: vslavik@… removed

in reply to:  91 comment:96 by Jared Bownds <jared.bownds@…>, 5 years ago

Replying to rjollos:

The timeline is a few months to get it on the trunk, then a preview development release to follow (milestone:1.1.3) and then finally it will be in a production-stable release, Trac 1.2, which will be released sometime next year I imagine. When one of the developers has time to work on it you will see activity in this ticket. All of the devs are volunteers on this project, and while we want to make Trac the most magnificent issue tracker in the world (and someday it will be), for the moment the reality of our day jobs limits us to only the waking moments away from our day jobs. Anyone is welcome to work on this ticket to move it along, there was good feedback on what needs to be done in comment:81 (see PatchWelcome and ThisTicketWasOpenedTenYearsAgo, and understand that the patch in this ticket needs to be improved). Thank you for your offer to test.

If you wish to show email addresses, you can try the show_email_addresses option in the [trac] section of trac.ini [TracIni#trac-section]. It may do what you want. I'm unsure.

Hi Ryan,

Thank you for your response. I do realize all the developers who contribute to this project do so on a volunteer basis, which is quite incredible. On the other hand, those who make the most noise typically receive the most attention, or maybe they get completely ignored!? At either rate, I appreciate you, and the the rest of the team who remain committed to improving Trac.

comment:97 by Ryan J Ollos, 5 years ago

Owner: set to Ryan J Ollos
Status: newassigned

in reply to:  92 comment:98 by anonymous, 5 years ago

Replying to rjollos:

I see that Jun has posted a plugin just this week, th:UsernameDecoratePlugin, which implements this feature. Hopefully that will hold everyone over until this ticket is resolved.

+1 for UsernameDecoratePlugin. It's a fairly small plugin without having to patch the Trac code. I tried the patch, but i prefer the way UsernameDecoratePlugin works from the UI perspective. I like the alt or pop-up hints. I think it's cleaner. Nice plugin!

Last edited 5 years ago by Ryan J Ollos (previous) (diff)

comment:99 by skrattaren@…, 5 years ago

Cc: skrattaren@… removed

in reply to:  89 comment:100 by Ryan J Ollos, 5 years ago

Replying to anonymous:

+1

known_users really needs to be cached

This will be implemented in #11868.

comment:101 by Ryan J Ollos, 4 years ago

Milestone: 1.1.31.1.4

comment:102 by Ryan J Ollos, 4 years ago

Milestone: 1.1.41.1.5

Narrowing focus for 1.1.4.

comment:103 by Ryan J Ollos, 4 years ago

Latest changes in log:rjollos.git:t7339.2. I haven't looked closely at these in many weeks. From what I remember, there was still a problem getting the user's full name displayed in the selects on the Query page.

comment:104 by Ryan J Ollos, 4 years ago

Milestone: 1.1.51.1.6

comment:105 by Ryan J Ollos, 4 years ago

Milestone: 1.1.61.2

Changes have been rebased now that #11474 is committed: log:rjollos.git:t7339.3. More work is needed, but I hope to have it done for milestone:1.2.

comment:106 by Ryan J Ollos, 4 years ago

Text inputs, such as the owner query filter and owner workflow field (when [ticket] restrict_owner is False), require a username to be input. This could be a bit confusing, but could be mediated by adding typeahead (similar to th:AutocompletePlugin, see #7628). I welcome other suggestions for handling this.

Last edited 4 years ago by Ryan J Ollos (previous) (diff)

comment:107 by Ryan J Ollos, 4 years ago

Release Notes: modified (diff)

comment:108 by Ryan J Ollos, 4 years ago

Proposed changes in log:rjollos.git:t7339.5.

In the future I'll look into adding more features of UsernameDecoratePlugin, but for now I just want to make sure we get these changes included in milestone:1.2.

comment:109 by Ryan J Ollos, 4 years ago

Resolution: fixed
Status: assignedclosed

Committed to trunk in [14247:14248,14258].

Last edited 4 years ago by Ryan J Ollos (previous) (diff)

comment:110 by Ryan J Ollos, 4 years ago

API Changes: modified (diff)

comment:111 by Ryan J Ollos, 4 years ago

Description: modified (diff)

comment:112 by Ryan J Ollos, 4 years ago

API Changes: modified (diff)

comment:113 by Ryan J Ollos, 4 years ago

Usernames need to be formatted in notification emails.

in reply to:  113 comment:114 by Ryan J Ollos, 4 years ago

Replying to Ryan J Ollos:

Usernames need to be formatted in notification emails.

#12206.

in reply to:  108 comment:115 by Ryan J Ollos, 4 years ago

Replying to Ryan J Ollos:

In the future I'll look into adding more features of UsernameDecoratePlugin, …

#12210

comment:116 by Adam Howell <Adam.Howell@…>, 3 years ago

Cc: Adam.Howell@… added

comment:117 by Christian Boos, 3 years ago

See also ticket:12120#comment:10 for a minor glitch in the "group progress" panel.

comment:118 by Ryan J Ollos, 3 years ago

Thanks, somehow I forgot to follow up on the issue. I'll look into the glitch shortly.

in reply to:  118 comment:119 by Christian Boos, 3 years ago

Replying to Ryan J Ollos:

Thanks, somehow I forgot to follow up on the issue. I'll look into the glitch shortly.

In the Jinja2 branch, while converting the progress_bar_grouped.html template, I think I fixed it. See in [b0ddc4d5/cboos.git#file1], set obfuscated = format_author(group.name) != format_author(group.name, show_email=false). Is that correct?

comment:120 by Ryan J Ollos, 3 years ago

Thanks for the hint, and sorry for the long delay. It appears the issue would be fixed with either of these changes:

  • Option 1
    • trac/templates/progress_bar_grouped.html

      diff --git a/trac/templates/progress_bar_grouped.html b/trac/templates/progress_bar_grouped.html
      index 077b700..1031aa7 100644
      a b Arguments:  
      2121      xmlns:i18n="http://genshi.edgewall.org/i18n"
      2222      py:strip="">
      2323  <table summary="${value_of('summary', None)}">
      24     <tr py:for="group in groups" py:with="obfuscated = format_author(group.name) != group.name;">
       24    <tr py:for="group in groups" py:with="obfuscated = format_author(group.name) != format_author(group.name, show_email=True);">
      2525      <th scope="row" py:choose="">
      2626        <i py:when="not group.name"><a href="${group.stats_href}">(none)</a></i>
      2727        <a py:when="grouped_by in ['owner', 'reporter']"
  • Option 2
    • trac/templates/progress_bar_grouped.html

      diff --git a/trac/templates/progress_bar_grouped.html b/trac/templates/progress_bar_grouped.html
      index 077b700..7eb3d6d 100644
      a b Arguments:  
      2121      xmlns:i18n="http://genshi.edgewall.org/i18n"
      2222      py:strip="">
      2323  <table summary="${value_of('summary', None)}">
      24     <tr py:for="group in groups" py:with="obfuscated = format_author(group.name) != group.name;">
       24    <tr py:for="group in groups" py:with="obfuscated = is_obfuscated(format_author(group.name))">
      2525      <th scope="row" py:choose="">
      2626        <i py:when="not group.name"><a href="${group.stats_href}">(none)</a></i>
      2727        <a py:when="grouped_by in ['owner', 'reporter']"
    • trac/web/chrome.py

      diff --git a/trac/web/chrome.py b/trac/web/chrome.py
      index 9e181a2..330b22b 100644
      a b from trac.resource import *  
      5050from trac.util import as_bool, as_int, compat, get_reporter_id, html,\
      5151                      presentation, get_pkginfo, pathjoin, translation
      5252from trac.util.html import escape, plaintext
      53 from trac.util.text import pretty_size, obfuscate_email_address, \
      54                            shorten_line, unicode_quote_plus, to_unicode, \
      55                            javascript_quote, exception_to_unicode, to_js_string
       53from trac.util.text import (
       54    exception_to_unicode, is_obfuscated, javascript_quote,
       55    obfuscate_email_address, pretty_size, shorten_line, to_js_string,
       56    to_unicode, unicode_quote_plus)
      5657from trac.util.datefmt import (
      5758    pretty_timedelta, datetime_now, format_datetime, format_date, format_time,
      5859    from_utimestamp, http_date, utc, get_date_format_jquery_ui, is_24_hours,
      class Chrome(Component):  
      615616        'group': presentation.group,
      616617        'groupby': compat.py_groupby,  # http://bugs.python.org/issue2246
      617618        'http_date': http_date,
       619        'is_obfuscated': is_obfuscated,
      618620        'istext': presentation.istext,
      619621        'javascript_quote': javascript_quote,
      620622        'ngettext': translation.ngettext,

I tend to think the latter is more clear.

comment:122 by Christian Boos, 3 years ago

Ah, I missed the introduction of trac.util.text.is_obfuscated… nice! Yes, it's better that way.

comment:123 by Ryan J Ollos, 3 years ago

API Changes: modified (diff)

comment:121 changes committed to trunk in [14683].

comment:124 by Ryan J Ollos, 3 years ago

r15185 fixes sorting of user fullnames in workflow reassign action control.

comment:125 by Ryan J Ollos, 3 years ago

#12593 is associated with this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted.
to The owner will be changed from Ryan J Ollos 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.