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

            kaulk Kuber Kaul added a comment - Issue created for above : https://issues.jenkins-ci.org/browse/JENKINS-40594
            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 ?
            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.
            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?

            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

            People

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

              Dates

                Created:
                Updated:
                Resolved: