Code Monkey home page Code Monkey logo

jira-worklogs's Introduction

Simple Tool for Exporting Work Logs from Atlassian JIRA

Exporting Work Logs from Atlassian JIRA can be cumbersome or too expensive. On the other side, Atlassian offers a useful JIRA REST API, which we can use to get all the data we need.

This simple Spring Boot application can export work logs from JIRA issues, for a specific user, in the given period.

The exported format is CSV. It can be easily opened in text processors or in Excel.

Configuration

In order to use the tool, we'll need to have a proper JIRA user account having permissions on the JIRA projects into which the work is logged. Additionally, the user should have a proper permissions assigned to read work logs.

Note: Instead of user password, we can use Atlassian ApiToken. See this link for the description how to create one.

We need to set parameters in application.yml:

  • baseUrl - Root URL of the JIRA REST API (v2 supported), e.g. https://myjira.atlassian.net/rest/api/2
  • username - JIRA Username (of the user having proper privileges set)
  • apiToken - API Token for the JIRA user (can also be JIRA user password, but is not recommended).

Starting the Application

We should first build and then start Spring Boot application. One of the options to do so is:

mvn spring-boot:run

Usage

Let's execute the endpoint for exporting work logs:

http://localhost:8080/work-logs/csv-export?userDisplayName=Firstname%20Lastname&startDate=2019-07-01&endDate=2019-07-31

Where:

  • userDisplayName - name of the JIRA user whose issue work logs are being exported
  • startDate - Period start date (ISO Data format) in which work happened (inclusive)
  • endDate - Period end date (ISO Data format) in which work happened (inclusive)
  • dayOfWeekList - (optional parameter) additional filter, comma-delimited list of week days to export (e.g. Mon,Tue,Wed)

Result

As a result, we'll download the CSV file, with next columns:

Work Date DOW Hours User Issue Key Issue Summary Issue Type Issue Priority Work Description
2019-07-22 Mon 8.00 John Doe PROJ-123 Show FAQs on web site Story Critical Implementing requested changes.
2019-07-23 Tue 1.00 John Doe PROJ-456 Code review Story Major Reviewing PRs from team members.

License

MIT License

Credits

Thanks to Marius Storm-Olsen for his code sample at Atlassian forum.

jira-worklogs's People

Contributors

drazen-hardenize avatar drazen-nikolic avatar

Stargazers

Jens avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.