-
Bug
-
Resolution: Fixed
-
Major
-
None
Steps to reproduce:
- Log in
- Run any job that's marked as a manual step
- The build should now say "Started by user <logged_in_username>"
- The api/xml for the build should have both a userId and userName xml tag for your user.
- Restart Jenkins
What is displayed?
- Build will say "started by anonymous"
- api/xml for the build will have userName, but not userId
- In script console, getUserId() for the build's MyUserIdCause returns null:
def getJobCause(jobName, jobNumber) {
def job = Jenkins.getInstance().getItemByFullName(jobName, Job.class);
def build = job.getBuildByNumber(jobNumber);
def actions = build.getActions(hudson.model.CauseAction)[0];
actions.getCauses()[0];
}
cause = getJobCause(<my_job_name>, <my_build_number>);
println cause.getUserId(); // this will return null
What is expected?
- Build to display "Started by user <logged_in_username>"
- The cause userId to not be null in both rest api and groovy api.
- duplicates
-
JENKINS-23828 Build Pipeline View doesn't show build user id on Downstream Projects
- Open