Get a worklog from Jira

    Hello everyone, I wrote about the api client for Jira. I began to deal with him when it became necessary to automate the generation of a report by 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
    It was originally thought that such a report could be pulled from Jira. But rummaging through it, they didn’t find anything. The new PM wrote a script that retrieved data from an already prepared excel file, but still, from time to time, you had to edit something with your hands. When I found out about this problem, I came across an api client for our favorite tracker and set to work.

    The result was a small python script that downloaded data into an excel file on a computer.
    After that, there was a need to store authorization data. 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 this, the utility began to be used by a couple more people and I had to add the functionality of downloading the report for a certain period. As a result, the utility window began to look like this:


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

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


    The report itself is generated either in a week, or for the required period of time specified by the user. If anyone will just be interested or even want to use it, all the source codes are here Repo GIT .

    Thank you for your attention =)

    Also popular now: