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

RunWrapper should have a "getCurrentResult()" method

    Details

    • Similar Issues:

      Description

      Specifically, I think it makes sense to have a RunWrapper.getCurrentResult() method that never returns null. That is, it should return Result.SUCCESS if run.getResult() is null, since users consistently get confused by RunWrapper.getResult() returning null.

        Attachments

          Issue Links

            Activity

            abayer Andrew Bayer created issue -
            abayer Andrew Bayer made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            abayer Andrew Bayer made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            Show
            abayer Andrew Bayer added a comment - PR up at  https://github.com/jenkinsci/workflow-support-plugin/pull/31
            abayer Andrew Bayer made changes -
            Remote Link This issue links to "PR #31 (Web Link)" [ 15616 ]
            jglick Jesse Glick made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java
            src/test/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapperTest.java
            http://jenkins-ci.org/commit/workflow-support-plugin/26b089847fb20d164f45424f757cef6da7ffc56c
            Log:
            [FIXED JENKINS-42521] Add RunWrapper.getCurrentResult()

            getCurrentResult() will never be null - if build().getResult() is
            null, it'll return Result.SUCCESS.toString(). In a perfect world, I'd
            change RunWrapper.getResult() to this behavior, but that'd possibly
            break existing logic out in the wild, so a new method it is.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java src/test/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapperTest.java http://jenkins-ci.org/commit/workflow-support-plugin/26b089847fb20d164f45424f757cef6da7ffc56c Log: [FIXED JENKINS-42521] Add RunWrapper.getCurrentResult() getCurrentResult() will never be null - if build().getResult() is null, it'll return Result.SUCCESS.toString(). In a perfect world, I'd change RunWrapper.getResult() to this behavior, but that'd possibly break existing logic out in the wild, so a new method it is.
            bitwiseman Liam Newman made changes -
            Link This issue relates to WEBSITE-364 [ WEBSITE-364 ]
            bitwiseman Liam Newman made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                abayer Andrew Bayer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: