Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-26313

checkUnresolvedIssues.py no longer works with latest python or latest JIRA release

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.9.0.AM2
    • None
    • build
    • None

    Description

      A couple months ago, I could run this script and it would automatically move JIRAs from last sprint to next sprint.

      export userpass=JIRAUSER:JIRAPWD
      
      # can filter out labels using --skipLabels "releasework, task, qa" etc.
      # can do a dry run (list issues, do not change them) with -D
      # skip verifying JIRA fixversions with -S
      # automatically apply changes with -A
      
      # for the latest sprint names see agile board https://issues.jboss.org/secure/RapidBoard.jspa?rapidView=641&view=planning
      # sometimes the sprint_NEXT is already created, but with a name that's different from what you might expect (eg., different month, wrong year)
      
      # if previous sprint is done, use sprint=sprint_NEXT here
      sprint="devex #153 August 2018"
      sprint_NEXT="devex #154 September 2018"
      versionWithRespin_jbt=4.9.0.AM2
      versionWithRespin_jbt_NEXT=4.9.0.AM3
      versionWithRespin_ds=12.9.0.AM2
      versionWithRespin_ds_NEXT=12.9.0.AM3
      python -W ignore /tmp/jbt.github/jbosstools-build-ci/util/checkUnresolvedIssues.py -S --jira https://issues.jboss.org \
        --jbt ${versionWithRespin_jbt} --jbt_NEXT ${versionWithRespin_jbt_NEXT} \
        --ds ${versionWithRespin_ds} --ds_NEXT ${versionWithRespin_ds_NEXT} \
        --sprint "${sprint}" --sprint_NEXT "${sprint_NEXT}" --skipLabels "task, releasework" -A
      

      Now it's broken because ...? not sure. Problem happens on line 191.

      Traceback (most recent call last):
        File "/tmp/jbt.github/jbosstools-build-ci/util/checkUnresolvedIssues.py", line 191, in <module>
          updateIssues(components.getIssuesFromQuery(query, jiraserver, jirauser, jirapwd), True, \
        File "/home/nboldt/tru/jbosstools-build-ci/util/components.py", line 196, in getIssuesFromQuery
          return doQuery(query, 'item', jiraserver, jirauser, jirapwd, 1000)
        File "/home/nboldt/tru/jbosstools-build-ci/util/components.py", line 215, in doQuery
          xml = minidom.parseString(q.text)
        File "/usr/lib64/python2.7/xml/dom/minidom.py", line 1928, in parseString
          return expatbuilder.parseString(string)
        File "/usr/lib64/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
          return builder.parseString(string)
        File "/usr/lib64/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
          parser.Parse(string, True)
      UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 172594: ordinal not in range(128)
      

      Seems to be a problem with `xml = minidom.parseString(q.text)` on line 215 of components.py

      Attachments

        Activity

          People

            nickboldt Nick Boldt
            nickboldt Nick Boldt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: