Open Bug 1517996 Opened 7 years ago Updated 5 years ago

User Activity Report page should link back to the user's profile.

Categories

(bugzilla.mozilla.org :: Extensions, enhancement)

Staging
enhancement
Not set
normal

Tracking

()

ASSIGNED

People

(Reporter: KWierso, Assigned: KWierso)

Details

Attachments

(2 files)

If I load someone's user activity report (for instance, https://bugzilla.mozilla.org/page.cgi?id=user_activity.html&action=run&from=-14d&who=wkocher@mozilla.com ), I can't currently get to that user's profile (in this case, https://bugzilla.mozilla.org/user_profile?user_id=308534 ). I feel like there should be a link to the user's profile somewhere.
Attached image user menu
Or maybe include this menu somewhere on the page?
(In reply to Wes Kocher (:KWierso) from comment #2) > I'd be happy to take a stab at this if someone could hold my hand a bit. I > assume it's > https://github.com/mozilla-bteam/bmo/blob/ > 56b4639601bbb91ffef70156a5a91114a584eb6d/extensions/BMO/template/en/default/ > pages/user_activity.html.tmpl that needs changed? > > Or would I need to edit > https://github.com/bugzilla/bugzilla/blob/ > d7cf1c91949248222806f5a32f485b12eab8806f/template/en/default/account/profile- > activity.html.tmpl ? Sure. You are welcome to take a shot at it. The first link is the template that will need to be updated, The other is for viewing changes made to a users account by an admin. It could probably be something as simple as a link under the filtering form called 'User Profile' that takes the user to the profile page directly. dkl
Assignee: nobody → wkocher
Status: NEW → ASSIGNED

Mmm, so who is the email address, but the links to user profiles use the numeric user id. Is there some way to translate email to id?

Flags: needinfo?(dkl)

(In reply to Wes Kocher (:KWierso) from comment #4)

Mmm, so who is the email address, but the links to user profiles use the numeric user id. Is there some way to translate email to id?

Yeah who is the query parameter passed to the form so it will normally always be the email address in string form.

The place you would need to add addition code is:

https://github.com/mozilla-bteam/bmo/blob/56b4639601bbb91ffef70156a5a91114a584eb6d/extensions/BMO/lib/Reports/UserActivity.pm#L320

such as:

$var->{user} = Bugzilla::User->new({ name => $input->{who}, cached => 1 });

And then in the template:

https://github.com/mozilla-bteam/bmo/blob/56b4639601bbb91ffef70156a5a91114a584eb6d/extensions/BMO/template/en/default/pages/user_activity.html.tmpl#L106

You could add something like:

<p>
  <a href="[% basepath FILTER none %]user_profile?user_id=[% user.id FILTER uri %]">User Profile</a>
</p>
Flags: needinfo?(dkl)

dkl, can I make you a mentor on this? We're in season for contributions for Outreachy.

Nevermind, Wes is taking it.

Flags: needinfo?(dkl)

Removing good-first-bug keyword because team does not have bandwidth to mentor at the moment.

Keywords: good-first-bug
Component: Extensions: UserProfile → Extensions
Attached file GitHub Pull Request

Totally untested, as I'm having issues getting docker or vagrant to run things locally.

Attachment #9131419 - Flags: feedback?(dkl)

@KWierso hmm, that's weird about the docker/vagrant issues.
If you have some spare time and you want to dig in, I've been working on this tooling recently.
Ping me on Matrix (@mitchhentges:mozilla.org) and we can figure out why it's not working :)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: