Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to download a time report using jira api with python

kleb12 July 11, 2019

I need to download a time report that I have created on a project in Jira using python. I've connected to the Jira api using oauth and I can navigate to the project but I cannot seem to find a way to download a csv of the time report that I have open in the project. For now, I would just like to download this locally to test but eventually I would like to make a process out of it. Sample code:

 

```

oauth_dict = {
'access_token':"token",
'access_token_secret':"secret_token",
'consumer_key':"consumer_key",
'key_cert':'key_cert'
}

jira = JIRA('https://my.host.net',oauth=oauth_dict)

jra = jira.project('PRO')

1 answer

0 votes
Thomas Deiler
Community Champion
July 14, 2019

Dear @kleb12 ,

there is nothing wrong with the API. You simply cannot download a CSV report with the API. Instead you have to create your own report by pulling the time tracking information from the issues.

So long

Thomas

kleb12 July 15, 2019

Is there any easy way to do this for numerous projects with numerous issues in each project? Like an ability to loop through all the issues in a project?

Thomas Deiler
Community Champion
July 15, 2019

Dear @kleb12 ,

sure, you can do  this recursively with the returned data from the API. But you have to code this on your own.

So long

Thomas

Suggest an answer

Log in or Sign up to answer