📜 ⬆️ ⬇️

Get worklog from jira

Hello everyone, I recently wrote about the api client for Jira. I started to deal with him when it became necessary to automate the formation of a report on time (reports are needed by the customer). The result is a small tool that allows you to quickly and easily pull out the necessary data.

image
Initially it was thought that such a report can be pulled out of Jira. But after flashing it, they didn’t find anything. The new PM has written a script that extracted data from an already-made excel file, but still, from time to time, something had to be ruled by hands. When I found out about this issue, I came across an api client for our favorite tracker and went to work.

It turned out a small python script that downloaded the data to the excel file on the computer.
After that, there was a need to store the data for the authorization. Added the following lines:
')
config = configparser.ConfigParser() config['DEFAULT'] = {'Login': login, 'ApiKey': api_key, 'Server': server} with open('config.ini', 'w') as configfile: config.write(configfile) 

After that, a couple more people started using the utility and had to add the functionality to upload the report for a certain period. As a result, the utility window looked like this:


Of course, the idea arose to translate everything into a graphical interface, but so far the linear algorithm and the interface is not needed.

Also, if there is no config.ini file next to main.py (or reporter.exe - the assembled exe-schnick), the utility will start the configuration process. Ask for a link to Jira, password or api-key and login:


The report itself is generated either for a week, or for the required period of time specified by the user. If anyone is just interested or even wants to use, all the sources are here Repo GIT .

Thank you for your attention =)

Source: https://habr.com/ru/post/458516/


All Articles