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

empty description in CodeMirror preview on Jenkins main page if auto-refresh is enabled

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • core
    • Jenkins 1.559
      reproduced on Win and Linux with Chrome / Chromium 34 and Firefox 30
    • 2.220 and 2.235.1 remove the auto refresh feature

      Recently, I've setup a non-empty description on the Jenkins main page (context path /).

      A click on the "edit description" button shows the previously entered description as expected. But with enabled auto-refresh mode the previously entered text is not shown (the preview textarea is empty).

      To reproduce the faulty behavior:

      • setup a non-empty description on the Jenkins main page (it does not matter if it contains HTML markup or not)
      • disable auto-refresh: /jenkins/?auto_refresh=false
      • click on "edit description" button: description should be properly displayed
      • enable auto-refresh: /jenkins/?auto_refresh=true
      • click the "edit description" button again: empty description is shown

      Some analysis showed that the endpoint /jenkins/descriptionForm (to get the current description) is triggered only if auto-refresh is disabled. The HTTP POST on /jenkins/descriptionForm is issued in replaceDescription() in hudson-behavior.js. The function replaceDescription is triggered by a click event on the "edit description" button:

      <a onclick="return replaceDescription();" id="description-link" href="editDescription">…</a>
      

      If auto-refresh is enabled, the onclick event binder on the is missing:

      <a id="description-link" href="editDescription">…</a>
      

          [JENKINS-23470] empty description in CodeMirror preview on Jenkins main page if auto-refresh is enabled

          Sascha Szott created issue -
          Sascha Szott made changes -
          Description Original: Recently, I've setup a non-empty description on the Jenkins main page (context path {{/}}).

          A click on the "edit description" button shows the previously entered description as expected. But with enabled auto-refresh mode the previously entered text is not shown (the preview textarea is empty).

          To reproduce the faulty behavior:

          * setup a non-empty description on the Jenkins main page (it does not matter if it contains HTML markup or not)
          * disable auto-refresh: {{/jenkins/?auto_refresh=false}}
          * click on "edit description" button: description should be properly displayed (/)
          * enable auto-refresh: {{/jenkins/?auto_refresh=true}}
          * click the "edit description" button again: empty description is shown (!)

          Some analysis showed that the endpoint {{/jenkins/descriptionForm}} (to get the current description) is triggered only if auto-refresh is disabled. The HTTP POST on {{/jenkins/descriptionForm}} is issued in {{replaceDescription()}} in {{hudson-behavior.js}}. The functipn {{replaceDescriptor}} is triggered by a click event on the "edit description" button:

          {code}
          <a onclick="return replaceDescription();" id="description-link" href="editDescription">…</a>
          {code}

          If auto-refresh is enabled, the onclick event binder on the is missing:
          {code}
          <a id="description-link" href="editDescription">…</a>
          {code}
          New: Recently, I've setup a non-empty description on the Jenkins main page (context path {{/}}).

          A click on the "edit description" button shows the previously entered description as expected. But with enabled auto-refresh mode the previously entered text is not shown (the preview textarea is empty).

          To reproduce the faulty behavior:

          * setup a non-empty description on the Jenkins main page (it does not matter if it contains HTML markup or not)
          * disable auto-refresh: {{/jenkins/?auto_refresh=false}}
          * click on "edit description" button: description should be properly displayed (/)
          * enable auto-refresh: {{/jenkins/?auto_refresh=true}}
          * click the "edit description" button again: empty description is shown (!)

          Some analysis showed that the endpoint {{/jenkins/descriptionForm}} (to get the current description) is triggered only if auto-refresh is disabled. The HTTP POST on {{/jenkins/descriptionForm}} is issued in {{replaceDescription()}} in {{hudson-behavior.js}}. The function {{replaceDescription}} is triggered by a click event on the "edit description" button:

          {code}
          <a onclick="return replaceDescription();" id="description-link" href="editDescription">…</a>
          {code}

          If auto-refresh is enabled, the onclick event binder on the is missing:
          {code}
          <a id="description-link" href="editDescription">…</a>
          {code}
          Oleg Nenashev made changes -
          Component/s New: core [ 15593 ]
          Daniel Beck made changes -
          Link New: This issue is related to JENKINS-19828 [ JENKINS-19828 ]
          Jenkins IRC Bot made changes -
          Component/s Original: gui [ 15492 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 156098 ] New: JNJira + In-Review [ 179213 ]
          Mark Waite made changes -
          Released As New: 2.220 and 2.235.1 remove the auto refresh feature
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            saschaszott Sascha Szott
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: