Quantcast

[JIRA] (JENKINS-14250) E-mail field is not automatically populated when a git plugin creates new user.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-14250) E-mail field is not automatically populated when a git plugin creates new user.

JIRA noreply@jenkins-ci.org
Issue Type: Bug Bug
Affects Versions: current
Assignee: Nicolas De Loof
Components: git, plugin
Created: 28/Jun/12 5:17 PM
Description:

Create a job that polls a git repo and emails committers

Commit to repo using some git-config name and email address

Check "People" page. A new user is created. Checking the user configure page shows that:

  • Their username is the git-config email without the @domain.com
  • Everything else is left blank (the email field is not automatically populated)
Environment: Jenkins 1.472 running in Ubuntu 11.04 on VMWare Fusion.
Fix Versions: current
Project: Jenkins
Labels: git plugin jenkins
Priority: Major Major
Reporter: Thomas Kelly
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-14250) E-mail field is not automatically populated when a git plugin creates new user.

JIRA noreply@jenkins-ci.org
Roger Geere commented on Bug JENKINS-14250

I believe that a change to GitChangeSet.java introduced this problem.

commit 222647bfb3a2bce31f0e1ea9193f4b804e7811fe
Author: Kohsuke Kawaguchi <[hidden email]>
Date: Wed Mar 21 13:27:40 2012 -0700

if (user == null)
user = User.get(csAuthorEmail.split("@")[0], true);

  • // set email address for user if needed
  • if (fixEmpty(csAuthorEmail) != null) {
    + // set email address for user if none is already available
    + if (fixEmpty(csAuthorEmail) != null && user.getProperty(Mailer.UserProperty.class)==null) { try { user.addProperty(new Mailer.UserProperty(csAuthorEmail)); } catch (IOException e) {

In the case where the call to User.get() causes a new user to be created it seems that the Mailer.UserProperty is already set with a Null string. This is not what I would expect from the documentation but I am not a java expert. So the email address from the commit does not get added to user. At any later stage a call to Mailer.UserProperty.gerAddress() seems to cause an abort. The visible result of this is that there is no creation of a directory and config.xml for the user in the jenkins /users directory.

Reverting this single change in the current code version shows that the directory and file start to be created again.

I am actually hitting a similar problem with the repo plugin which causes problems for the extended e-mail plugin and suspect it may be a similar issue.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-14250) E-mail field is not automatically populated when a git plugin creates new user.

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: Roger Geere (16/Aug/12 9:30 AM)
Assignee: Nicolas De Loof Kohsuke Kawaguchi
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-14250) E-mail field is not automatically populated when a git plugin creates new user.

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Roger Geere commented on Bug JENKINS-14250

I have looked at User.java and it does seem that a default Mailer.UserProperty is created when a new User is created. So I believe the test

getProperty(Mailer.UserProperty.class)==null)

will always fail.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Loading...