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

Inappropriate Ancestor list from a @JavaScriptMethod

    Details

    • Similar Issues:

      Description

      https://github.com/jan-molak/jenkins-build-monitor-plugin/issues/79 was traced to the fact that a plugin was binding a View with a @JavaScriptMethod. When this method was called, the StaplerRequest in effect (/$stapler/bound/<UUID>/<method>) has a useless List<Ancestor>: the BoundObjectTable, then the View, but with a getUrl of /jenkins/<UUID> (where the /$stapler/bound went missing). So AbstractItem.getUrl (as of JENKINS-19310) produced <UUID>/job/<jobname>/, which of course does not work.

      What was really wanted was an ancestor list copied from the original HTML rendering request that produced the JavaScript using this method, so that the final result would have been view/<viewname>/job/<jobname>/ as it would have been from a Jelly call.

      Ideally the @JavaScriptMethod would copy the ancestors from the original request, like https://github.com/jenkinsci/jenkins/commit/ea95434938b2111d8768528823990a78bdc58d3e#diff-3 did for ProgressiveRendering.

        Attachments

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                Unassigned
                Reporter:
                jglick Jesse Glick
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: