Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8987

The user email field as populated by jenkins/perforce plugin contains the incorrect email address..

    XMLWordPrintable

Details

    Description

      The user email address as fetched by Jenkins for a Perforce user is incorrect. It is of the form "<domain>_<username>@<p4_client_name>". Instead it should be directly fetched from the p4 user details.
      The same should be done for the name of the user. It should be fetched from the FullName p4 user field.

      – Posted from Bugbox for Android

      Attachments

        Activity

          rpetti Rob Petti added a comment -

          Upon examining the Jenkins code, it looks like '\' isn't supported for the user id (among other things), so it's replaced with '_' upon creation. It doesn't look like there's anything I can do, since the original user id string is destroyed upon creation. What's being displayed is likely the Full Name of the user, which we can't always count on being the correct perforce user ID.

          Using 'domain\username' for all your perforce users is definitely not a use-case that any of the plugin devs have considered, so it would take quite a bit of refactoring in order to support such an odd convention.

          rpetti Rob Petti added a comment - Upon examining the Jenkins code, it looks like '\' isn't supported for the user id (among other things), so it's replaced with '_' upon creation. It doesn't look like there's anything I can do, since the original user id string is destroyed upon creation. What's being displayed is likely the Full Name of the user, which we can't always count on being the correct perforce user ID. Using 'domain\username' for all your perforce users is definitely not a use-case that any of the plugin devs have considered, so it would take quite a bit of refactoring in order to support such an odd convention.
          gaganmalik Gagan Malik added a comment - - edited

          Interesting! As per my understanding, the domain\username convention is pretty standard with Windows networks.
          Another thing that I would like to point out here is that the name field in Jenkins is also being set in an incorrect fashion, if it is supposed to contain the full name. This is because right now it is being populated with the username as opposed to the full name from the p4 user details.

          Ideally I believe it should be the full name but since it is not and 'if it is not supposed to be', I assume the \ and _ should be a easy fix then.

          gaganmalik Gagan Malik added a comment - - edited Interesting! As per my understanding, the domain\username convention is pretty standard with Windows networks. Another thing that I would like to point out here is that the name field in Jenkins is also being set in an incorrect fashion, if it is supposed to contain the full name. This is because right now it is being populated with the username as opposed to the full name from the p4 user details. Ideally I believe it should be the full name but since it is not and 'if it is not supposed to be', I assume the \ and _ should be a easy fix then.
          rpetti Rob Petti added a comment -

          domain\username is standard in windows networks, yes, but this is perforce, not windows networking. I've never seen anyone else use that convention for perforce, even those set up for domain authentication.

          As I mentioned, Jenkins does not provide an appropriate interface for retrieving the Full Name of a user from any SCM. By default, it's set to whatever user ID is being requested ("domain\username" in this case). This is what is displayed when you examine the Jenkins user in the web UI.

          I'm already working on a solution that involves adding a separate property to jenkins user objects that will store the correct perforce user id. It should make it into the next release.

          rpetti Rob Petti added a comment - domain\username is standard in windows networks, yes, but this is perforce, not windows networking. I've never seen anyone else use that convention for perforce, even those set up for domain authentication. As I mentioned, Jenkins does not provide an appropriate interface for retrieving the Full Name of a user from any SCM. By default, it's set to whatever user ID is being requested ("domain\username" in this case). This is what is displayed when you examine the Jenkins user in the web UI. I'm already working on a solution that involves adding a separate property to jenkins user objects that will store the correct perforce user id. It should make it into the next release.
          gaganmalik Gagan Malik added a comment - - edited

          sorry! I assumed perforce set up with active directory authentication uses domain\username by default in case of multiple domains.
          Thanks for the explanation

          looking forward to have this working..
          thanks!

          gaganmalik Gagan Malik added a comment - - edited sorry! I assumed perforce set up with active directory authentication uses domain\username by default in case of multiple domains. Thanks for the explanation looking forward to have this working.. thanks!
          rpetti Rob Petti added a comment -

          This should be fixed, but it might take several builds for the information to be correctly populated.

          rpetti Rob Petti added a comment - This should be fixed, but it might take several builds for the information to be correctly populated.

          People

            rpetti Rob Petti
            gaganmalik Gagan Malik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: