Relies on: #965890: [meta] Revisit VersioncontrolAccount and bring it up to speed

Once the author/committer handling is done, the views lists will need to have handlers that use that mapping to create links to user profiles where possible.

Comments

marvil07’s picture

sdboyer’s picture

Title: Create a handler to map the author of a commit to their drupal user » Create a views handler to map the author of a commit to their drupal user
Issue tags: -git sprint 4 +git sprint 5

Just updating title, because we're also going to need a handler of sorts to actually do the data mapping. And I thought this was about that, not the views integration :)

sdboyer’s picture

To be clear, the responsibility of this view handler is simply going to be using the uid (if non-zero) to produce a link to the user's profile page; if zero, then some sanitized form of the raw VCS data should be presented instead. That's gonna be a little complicated for git, unfortunately, since that author information is going to be in a separate table...but yeah.

The actual work of producing an accurate mapping that fills UIDs properly will be one of the outcomes of #965890: [meta] Revisit VersioncontrolAccount and bring it up to speed, the issue tizzo originally mentioned.

sdboyer’s picture

Assigned: Unassigned » sdboyer
Priority: Normal » Critical

I'll take care of this next week.

marvil07’s picture

tagging

marvil07’s picture

marvil07’s picture

Status: Postponed » Active

Today sdboyer explain me why #979040: Make pluggable the process of mapping of raw vcs data to Drupal users is not required. My concern was that other modules/plugins can be maintaining its mapping in other place, but pur implementation of plugins is going to me requiring the plugins to write their result on our operations tables.

Writing it here to avoid forgetting it, and also re-opening as the required issue was fixed.

tizzo’s picture

Status: Active » Needs work

This is done and working but Sam suggested that we want to display drupal usernames not git user.names for authors with an id.

Also this could be generalized to work with committers as well.

Commit: http://drupal.org/cvs?commit=458894

sdboyer’s picture

Oh, we don't have it set for committers already? It should be. All of my recent decisions have been driving towards making author/committer architecturally identical specifically so that we can reuse things like this for both of them.

marvil07’s picture

Status: Needs work » Postponed

Until we end up agreeing about what to store at {versioncontrol_operations}.author and committer, so the last patch assumed a git-like person inside the field, and that's git backend specific.

I suppose I going to link the related issue when it is created ;-)

marvil07’s picture

Assigned: sdboyer » Unassigned

the related issue #988512: Properly track git's user.email and user.name as separate, first-class properties

but we need to revert that email filter on field handler view render since it is git specific

marvil07’s picture

Issue tags: +git sprint 6
marvil07’s picture

Title: Create a views handler to map the author of a commit to their drupal user » Create a views handler to map operation author/committer to their drupal user
Component: API module » Views integration
Assigned: Unassigned » marvil07
Status: Postponed » Needs review
StatusFileSize
new5.72 KB

#988512: Properly track git's user.email and user.name as separate, first-class properties was fixed, and it was decided to store only emails for git backend at the operations table. So, we definitely need to change how git shows this overwritting the view, but that is going to be handled at #990644: Improve backend interaction with views and naturally is git backend specific, so the following patch does the work I expected it to do :-)

The patch:

  • Add "person" handler for operation author/committer.
  • Now author/committer link is autogenerated by the handler, so remove link creation on the global text field at the commitlog_global_commits view.

BTW I am not showing the committer, since I in CVCS it would be redundant, so we should overwrite this behavior on views after #990644: Improve backend interaction with views.

sdboyer’s picture

Haven't looked at the patch yet, but it sounds good, at least. However, another way to handle author/committer in a way that'll be backend agnostic is to assume that committer is valid, but only show the data if it's different from the author. That means a single handler that grabs both fields, compares them, and decides whether to show just author or author + committer. We should also provide another handler that does that, it's not exclusive with what it sounds like marvil07 has in #14.

marvil07’s picture

Status: Needs review » Needs work

Then , IMHO we should provide another views field that do that with its own handler.

marvil07’s picture

Status: Needs work » Needs review

I can not upload patches to d.o :-( #997192: form cache broken on drupal.org due to broken memcache

But I have one new version for this: http://tmp.marvil07.net/0001-task-970244-Create-a-views-handler-to-map-o...

What is new:

  • Add an attribution operation field handler to show author and committer if necessary.
  • Use operation attribution field on commitlog global commits view.
marvil07’s picture

sdboyer’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, go ahead and commit. There are some typos, but I can fix them later. I'm considering picking nits on the attribution handler (we should maybe provide a UI that lets the user decide how the text gets structured), but it's not a big deal for now. Can open another issue later, if need be.

marvil07’s picture

Status: Reviewed & tested by the community » Fixed
sdboyer’s picture

Status: Fixed » Reviewed & tested by the community

Awesome. Thanks.

sdboyer’s picture

Status: Reviewed & tested by the community » Fixed

Whoops, accidentally changed status.

Status: Fixed » Closed (fixed)
Issue tags: -git phase 2, -git sprint 5, -versioncontrol account refactor, -git sprint 6

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

  • Commit d153eba on repository-families, drush-vc-sync-unlock by tizzo:
    #970244, added author handler that sanitizes the author name and links...
  • Commit d5a37f4 on repository-families, drush-vc-sync-unlock by marvil07:
    task #970244: Create a views handler to map operation author/committer...

  • Commit d153eba on repository-families by tizzo:
    #970244, added author handler that sanitizes the author name and links...
  • Commit d5a37f4 on repository-families by marvil07:
    task #970244: Create a views handler to map operation author/committer...