"Maintainers for X" list in the sidebar on project pages currently lists git usernames, linked to D.o user profiles.
Instead it should list the actual usernames.

Example: https://drupal.org/project/magic
Sidebar says ChinggizKhan, while his d.o username is iamcarrico (https://drupal.org/u/iamcarrico).

Comments

dww’s picture

Title: List of maintainers on a project page should display Drupal.org usernames instead of git usernames » List of maintainers on a project page should display Drupal usernames instead of git usernames
Project: Project » Version Control / Project* integration
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: Projects » Code

That block is from versioncontrol_project, not project itself.

The block output is generated in versioncontrol_project_block_view(). A very quick skim of the code doesn't immediately reveal why we're getting Git usernames here, not the regular Drupal users. Sure looks like we're joining on {users} to get the name field and should be printing that. ;) I'm about to get on a plane and I'm not sure my local dev site will be able to reproduce this, but I wanted to move to the right queue and provide some initial pointers on what functions to debug.

Cheers,
-Derek

marvil07’s picture

Not sure either what happened, but code seem to be producing the right results, i.e. on git7site:

$ drush php-eval 'print_r(versioncontrol_project_get_project_committers(1910134));'
Array
(
    [1300542] => stdClass Object
        (
            [uid] => 1300542
            [name] => iamcarrico
            [first_commit] => 1360279871
            [last_commit] => 1400626580
            [commits] => 38
        )

    [761344] => stdClass Object
        (
            [uid] => 761344
            [name] => fubhy
            [first_commit] => 1382998665
            [last_commit] => 1383140577
            [commits] => 2
        )

    [820332] => stdClass Object
        (
            [uid] => 820332
            [name] => Snugug
            [first_commit] => 1360188843
            [last_commit] => 1368904507
            [commits] => 21
        )

)
drumm’s picture

Assigned: Unassigned » drumm
Status: Active » Fixed

This is caching. DELETE FROM versioncontrol_project_maintainers_block_cache WHERE cid = 'project_maintainers:1910134'; fixed it. A Git push would have corrected it too.

dww’s picture

Great, thanks!

Status: Fixed » Closed (fixed)

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