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

Access to submitter ID from return value of input step

    XMLWordPrintable

Details

    Description

      Currently the input step records the submitter ID in ApproverAction but does not make this information available to the script. There should be an option to include a map entry with key submitter in the return value of the step. (Cannot be enabled by default for compatibility reasons.)

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick created issue -
            owenmehegan Owen Mehegan added a comment -

            I was asking for this in IRC (autojack).

            owenmehegan Owen Mehegan added a comment - I was asking for this in IRC (autojack).

            Just want to add that I think it would be useful to have access to the user display name as well.

            nkonstantakos Niko Konstantakos added a comment - Just want to add that I think it would be useful to have access to the user display name as well.
            rtyler R. Tyler Croy made changes -
            Field Original Value New Value
            Workflow JNJira [ 166736 ] JNJira + In-Review [ 182453 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            jglick Jesse Glick made changes -
            Component/s pipeline-input-step-plugin [ 21708 ]
            Component/s pipeline [ 21692 ]
            dcsobral Daniel Sobral added a comment -

            I record relevant information from the build on Bitbucket and JIRA. Who clicked on the input button is rather relevant.

            dcsobral Daniel Sobral added a comment - I record relevant information from the build on Bitbucket and JIRA. Who clicked on the input button is rather relevant.
            jswager1 Jason Swager added a comment -

            Submitted https://github.com/jenkinsci/pipeline-input-step-plugin/pull/8 to address this, because I want the feature too.

            Just not sure what the process is of getting a code review performed and getting it merged.

            jswager1 Jason Swager added a comment - Submitted https://github.com/jenkinsci/pipeline-input-step-plugin/pull/8 to address this, because I want the feature too. Just not sure what the process is of getting a code review performed and getting it merged.
            jglick Jesse Glick made changes -
            Assignee Jesse Glick [ jglick ] Jason Swager [ jswager1 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/org/jenkinsci/plugins/workflow/support/steps/input/InputStep.java
            src/main/java/org/jenkinsci/plugins/workflow/support/steps/input/InputStepExecution.java
            src/main/resources/org/jenkinsci/plugins/workflow/support/steps/input/InputStep/config.jelly
            src/main/resources/org/jenkinsci/plugins/workflow/support/steps/input/InputStep/help-submitterParameter.html
            src/test/java/org/jenkinsci/plugins/workflow/support/steps/input/InputStepTest.java
            http://jenkins-ci.org/commit/pipeline-input-step-plugin/100612542fc3356f72b898b8220e67c4818a9703
            Log:
            Merge pull request #8 from jenkinsci/submitter-variable

            [FIXED JENKINS-31396] Add the submitterParameter property

            Compare: https://github.com/jenkinsci/pipeline-input-step-plugin/compare/2a413ef71dab...100612542fc3

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/workflow/support/steps/input/InputStep.java src/main/java/org/jenkinsci/plugins/workflow/support/steps/input/InputStepExecution.java src/main/resources/org/jenkinsci/plugins/workflow/support/steps/input/InputStep/config.jelly src/main/resources/org/jenkinsci/plugins/workflow/support/steps/input/InputStep/help-submitterParameter.html src/test/java/org/jenkinsci/plugins/workflow/support/steps/input/InputStepTest.java http://jenkins-ci.org/commit/pipeline-input-step-plugin/100612542fc3356f72b898b8220e67c4818a9703 Log: Merge pull request #8 from jenkinsci/submitter-variable [FIXED JENKINS-31396] Add the submitterParameter property Compare: https://github.com/jenkinsci/pipeline-input-step-plugin/compare/2a413ef71dab...100612542fc3
            jglick Jesse Glick made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            jhovell John Hovell added a comment -

            It seems necessary to include at least one custom parameter. For example this will work:

            def inputResponse = input(message: 'Should we proceed', submitter: "myorg*myteam", submitterParameter: 'approver', parameters:[booleanParam(defaultValue: false, description: '', name: 'promote')] )

            But the more sensible simplification returns null:

            def inputResponse = input(message: 'Should we proceed', submitter: "myorg*myteam", submitterParameter: 'approver' )

            Is this expected?

            jhovell John Hovell added a comment - It seems necessary to include at least one custom parameter. For example this will work: def inputResponse = input(message: 'Should we proceed', submitter: "myorg*myteam", submitterParameter: 'approver', parameters: [booleanParam(defaultValue: false, description: '', name: 'promote')] ) But the more sensible simplification returns null: def inputResponse = input(message: 'Should we proceed', submitter: "myorg*myteam", submitterParameter: 'approver' ) Is this expected?
            jglick Jesse Glick added a comment -

            jhovell

            Is this expected?

            No, sounds like a bug, please file separately “blocking” this one.

            jglick Jesse Glick added a comment - jhovell Is this expected? No, sounds like a bug, please file separately “blocking” this one.
            kaulk Kuber Kaul added a comment - - edited

            jhovell jglick - Facing the same issue, did you create a ticket ?

            kaulk Kuber Kaul added a comment - - edited jhovell jglick - Facing the same issue, did you create a ticket ?
            kaulk Kuber Kaul made changes -
            Link This issue depends on JENKINS-40594 [ JENKINS-40594 ]
            kaulk Kuber Kaul added a comment - Issue created for above : https://issues.jenkins-ci.org/browse/JENKINS-40594

            People

              jswager1 Jason Swager
              jglick Jesse Glick
              Votes:
              5 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: