Skip to content

nop77svk/jira-worklogger

Repository files navigation

Jira Worklogger

Creative Commons License
Licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

The problem

Do you have to track your work by means of Jira issue worklogs? Is the Jira GUI clickfest approach making your neurotic inner beast emerge on the surface?

The solution

Meet the scripted Jira worklogging! Give it your worklogs in a CSV file (and your server URI and your user credentials in a config file) and let the automaton do the rest!

Prerequisites

  • .NET 6 run-time installed (for simple, cross-platform build) or no .NET runtime necessary (for self-contained, single-exe, Windows-only build); You choose!
  • Jira server
    • "vanilla" Jira server support: ✔️ (version 2 REST API)
    • "Tempo Timesheets" plugin support: ✔️ (version 4 REST API)
    • "ICTime" plugin support: ✔️ (version 1.0 REST API)

Configuration

The jwl.config file is a simple JSON structure. It can be placed in (and will be read by jwl in the priority order of)

  • "current folder" (as in "where your shell's %CD% or ${PWD} is at the moment")
  • local application data (%USERPROFILE%\AppData\Local)
  • roaming application data (%USERPROFILE%\AppData\Roaming)
  • jwl's "installation" folder

As for the CLI worklogger binary, there are command-line options available as well. Any partial options supplied via CLI will override their respective jwl.config counterparts with the highest priority.

"ServerClass" setting

Available values are:

  • Vanilla
  • TempoTimeSheets
  • ICTime

The input CSV structure

Five columns, data delimited (by default) by a colon:

  • Date (string) - worklog day date (valid formats: YYYY-MM-DD, YYYY/MM/DD, DD.MM.YYYY, all with optional HH:MI:SS part)
  • IssueKey (string) - Jira issue key (SOMEPROJECT-1234 and the likes)
  • WorkLogActivity (string) - Tempo Timesheets worklog type or ICTime activity; values are remapped based on a supplied configuration file (2do!)
  • TimeSpent (string) - time to be logged for the Jira issue and the date (valid formats: HH:MI, MI, HH h MI, HH h MI m)
  • WorkLogComment (string) - optional worklog comment