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

Access to submitter ID from return value of input step

    Details

    • Similar Issues:

      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

            Hide
            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

            Show
            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
            Hide
            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?

            Show
            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?
            Hide
            jglick Jesse Glick added a comment -

            John Hovell

            Is this expected?

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

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

            John Hovell Jesse Glick - Facing the same issue, did you create a ticket ?

            Show
            kaulk Kuber Kaul added a comment - - edited John Hovell Jesse Glick - Facing the same issue, did you create a ticket ?
            Hide
            kaulk Kuber Kaul added a comment -
            Show
            kaulk Kuber Kaul added a comment - Issue created for above : https://issues.jenkins-ci.org/browse/JENKINS-40594

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: