wogscpar / SZZUnleashed

An implementation of the SZZ algorithm, i.e., an approach to identify bug-introducing commits.
MIT License
110 stars 76 forks source link

Fetching issues does not work properly #25

Closed nyyti closed 5 years ago

nyyti commented 5 years ago

Jenkins or Jira issues are not downloaded correctly. The fetch.py file's function fetch downloads only 50 issues at a time and pagination does not work either as everytime the 50 first issues are downloaded.

I tested the code with several Jira projects and the Jenkins project provided as an example. All tested projects had the same problem.

Apparently the Jira REST API's syntax has changed which causes the problem. I fixed the issue by changing start_at to startAt and max_results to maxResults. Example of my fix is below

    request = 'https://' + jira_project_name + '/rest/api/2/search?'\
        + 'jql={}&startAt={}&maxResults={}'
wogscpar commented 5 years ago

Ah yes I can see that in the jira/docs as well. Thanks for spotting this, I'm pushing a fix right away.