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

Use Jenkins user id instead of user name as buildUser

    Details

    • Similar Issues:

      Description

      Hi Naresh,

       

      I'm facing a (really) small issue with the plugin:

      My JIRA server and Jenkins server are sharing the same users IDs, but users IDs and display names are different ('jdoe' as ID and 'John DOE' as display name for instance).

      Is there a specific reason you used the UserIdCause.getUserName() instead of UserIdCause.getUserId() to compute the buildUser?

      Is it possible to change it? (or maybe make it configurable at least?)

       

      JiraStepExecution.java - ligne 136

      buildUser = ((UserIdCause) causes.get(0)).getUserId();
      

      Just made this small change and it worked well for me (for steps I tested: jiraAddComment, jiraNewVersion).

       

      Comment with Jenkins user name:

      Comment with Jenkins user ID:

      What do you think?

       

      P.S. Thanks a lot for this plugin by the way, it's helping me a lot 

       

        Attachments

          Activity

          Hide
          nrayapati Naresh Rayapati added a comment - - edited

          +1, I didn't realize this as userName and userId are same on my local Jenkins instance. For now I will update it to use UserId instead and also will think of this as a configurable in future when I have situation where this differs. Thanks for reporting this Kevin Darne

          Show
          nrayapati Naresh Rayapati added a comment - - edited +1, I didn't realize this as userName and userId are same on my local Jenkins instance. For now I will update it to use UserId instead and also will think of this as a configurable in future when I have situation where this differs. Thanks for reporting this Kevin Darne
          Show
          nrayapati Naresh Rayapati added a comment - PR:  https://github.com/jenkinsci/jira-steps-plugin/pull/51
          Hide
          nrayapati Naresh Rayapati added a comment -

          I have merged the changes in, I will cut the new tag after further verification. Thanks. 

          Show
          nrayapati Naresh Rayapati added a comment - I have merged the changes in, I will cut the new tag after further verification. Thanks. 
          Hide
          nrayapati Naresh Rayapati added a comment -

          Released 1.2.5, should be available soon in the update center. 

          Thanks again Kevin Darne for reporting. 

          Closing this JIRA now. 

          Show
          nrayapati Naresh Rayapati added a comment - Released 1.2.5, should be available soon in the update center.  Thanks again Kevin Darne for reporting.  Closing this JIRA now. 
          Hide
          paldari Kevin Darne added a comment -

          Wow, thank you for the quick reaction

          Show
          paldari Kevin Darne added a comment - Wow, thank you for the quick reaction

            People

            • Assignee:
              nrayapati Naresh Rayapati
              Reporter:
              paldari Kevin Darne
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: