In order to get all the issues' worklogs without specifying one particular issue or project, you have to loop through all the issues.
To do this, you have to execute a search on the system with this query:
all_project_key = jira.search_issues('project is not empty&fields=key')
This will return the first 50 issues key of the system and a number, in the field maxResults
, of the total number of issues present.
Taken than number, you can perform others searches adding the to the previous query:
&startAt=50
With this new parameter you will be able to fetch the issues from 51 to 100 (or 50 to 99 if you consider the first issue 0).
The next query will be &startAt=100 and so on until you fetch all the issues in the system.
If you wish to fetch more than 50 issues, add to the query:
&maxResults=200
Once you have finished looping through the system, you will have the list of all the issues where you can loop to retrieve the worklog of that issue.
Unfortunately I don't think you can fetch all the worklogs of all the issues at once.
EDIT:
Added query in JIRA python.