In JIRA shell I'm doing the following:
In [3]: while True:
...: res = jira.search_issues(jql_str='project = FAD', maxResults=100)
...: if len(res) == 0:
...: break
...: for issue in res:
...: try:
...: print('deleting %s' % issue.key)
...: issue.delete(deleteSubtasks=True)
...: except Exception as e:
...: print(e)
the input works until i come to an issue with a sub task. Then I get this errort:
JiraError HTTP 500 url: http://nyc-cbmweb-d29:8080/rest/api/2/issue/175200?deleteSubtasks=True
text: Internal server error
response headers = {'X-Frame-Options': 'SAMEORIGIN', 'X-XSS-Protection': '1; mode=block', 'X-AUSERNAME': 'flowbot', 'X-ASEN': 'SEN-9828933', 'X-ASESSIONID': '1u79oy6', 'Content-Security-Policy': "frame-ancestors 'self'", 'X-Content-Type-Options': 'nosniff', 'Date': 'Wed, 07 Mar 2018 14:52:32 GMT', 'Transfer-Encoding': 'chunked', 'Cache-Control': 'no-cache, no-store, no-transform', 'Content-Type': 'application/json;charset=UTF-8', 'X-AREQUESTID': '592x122483x1', 'Connection': 'close', 'X-Seraph-LoginReason': 'OK'}
response text = {"errorMessages":["Internal server error"],"errors":{}}
According to the rest API documentation, deleteSubtasks=True should work
UPDATE: I actually tried this from the browser and it failed due to a
java.lang.NullPointerException