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

Copy of groovy script inside jobs sometime fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • jobcopy-builder-plugin
    • None
    • Jenkins 2.399
      jobcopy plugin 1.5.0

      This one can't be reproducible, it happens from time to time for some years now, only affects area of the job with groovy scripts, instead of copy the code as is, from time to time it starts to copy a line, stops at half copy, then copies it again correctly in the next line:

      example:

       

      copy job with bug:
      
      img = "<img src='image' style='display: none;' " +
              "onerror=\"document.getElementById('$id').closest('.jenkins-form-item').style.display=''; document.getElementsByClassName('jenkins-button--primary')[0]
              "onerror=\"document.getElementById('$id').closest('.jenkins-form-item').style.display=''; document.getElementsByClassName('jenkins-button–primary')[0.disabled=true;\">"
      
      the original:
      
      img = "<img src='image' style='display: none;' " +
              "onerror=\"document.getElementById('$id').closest('.jenkins-form-item').style.display=''; document.getElementsByClassName('jenkins-button--primary')[0.disabled=true;\">" 

      Normally I try to fix this, when it happens by dividing the code, putting some random empty lines or tabs. With luck the bug disapears.

      other notes:

      • This job is huge
      • This copy happens to more than 500 projects, but only on some of them this happens, for the rest the copy is ok.

       

       

            Unassigned Unassigned
            supertwinky hugo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: