Chris Nelson
Chris Nelson

Reputation: 3707

How can I get a report of work I logged in JIRA?

My goal it to be able to figure out how long I've been working on something. I'm fairly good about recording time on a task before moving to the next so the answer to "How long have I been working on Task B?" Is the same as "When did I last log time on Task A." What I'd like to see is a report like:

|Key   |Time Logged|When Logged|
|Task A|1h         |8:30am     |
|Task B|30m        |9:00am     |
|Task A|1h         |10:30am    |

This lets me answer two questions:

First, I see that I didn't account for a half hour between 9:00 and 10:30.

Second, if I've been working on Task C and it's noon, looking at that I know to add an hour and a half to Task C before going to lunch. I've tried and tried and can't figure out how to do that. Can I?

The best I've been able to do is to get ticket update as a date but that's wrong if I took notes in the ticket or, worse, someone else updated a ticket I had been working on while I was away.

Upvotes: 3

Views: 5327

Answers (4)

Shridhar L
Shridhar L

Reputation: 599

I know this is late, but could help others comming across this thread.

Jira Assistant is of the open source free tool which helps generating worklog and sprint report and supports time tracking with calendar and timer.

Jira Assistant Worklog report

This is available as web version, browser extension, App for Jira Cloud, etc. and has lot more other useful features:

For web version: https://app.jiraassistant.com/

For Chrome extension: https://chrome.google.com/webstore/detail/jira-assistant/momjbjbjpbcbnepbgkkiaofkgimihbii?src=atls_ans

For Firefox extension: https://addons.mozilla.org/en-US/firefox/addon/jira-assistant/

For Edge: https://microsoftedge.microsoft.com/addons/detail/jira-assistant-worklog-/aoenpdbabcjnjbjpegeenodfknllmaoi?utm_source=atls_ans

Visit https://www.jiraassistant.com for more details and other install options.

Disclaimer: I am the developer of this extension.

Upvotes: 0

GlennV
GlennV

Reputation: 3650

If you're willing to script something, then you could use JIRA's REST API. It contains a resource to retrieve work log info:

GET /rest/api/2/issue/{issueIdOrKey}/worklog

It returns a response like this:

{
    "startAt": 0,
    "maxResults": 1,
    "total": 1,
    "worklogs": [
        {
            "self": "http://www.example.com/jira/rest/api/2/issue/10010/worklog/10000",
            "author": {
                "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
                "name": "fred",
                "displayName": "Fred F. User",
                "active": false
            },
            "updateAuthor": {
                "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
                "name": "fred",
                "displayName": "Fred F. User",
                "active": false
            },
            "comment": "I did some work here.",
            "updated": "2017-07-12T08:30:10.234+0000",
            "visibility": {
                "type": "group",
                "value": "jira-developers"
            },
            "started": "2017-07-12T08:30:10.234+0000",
            "timeSpent": "3h 20m",
            "timeSpentSeconds": 12000,
            "id": "100028",
            "issueId": "10002"
        }
    ]
}

You'd still need to figure out a way to figure out the involved issues though.

Alternatively, there are also add-ons that try to make time tracking easier. Tempo for example has "Tracker" functionality so you just have to click start/stop buttons to generate your work logs.

Upvotes: 2

Clomp
Clomp

Reputation: 3308

It seems like other people on SO have also run into Jira's lack of time reporting features before: Total in progress time in JIRA <- I was wondering why Bernie G's answer at this link was "won't fix". So I started digging into Jira a bit. Here is what I found out:

  1. Here is the Jira improvement ticket, where they marked this idea Generate worklog report as a Won't Fix item: https://jira.atlassian.com/browse/JRASERVER-6137
  2. JQL is used as a filtering language in the backlog section. It isn't a reporting language. What you need is a report.
  3. Jira's default reports section doesn't seem to contain anything related to time reporting.
  4. If you are a Jira Admin, there is a plugin search feature under the gear icon / settings > Add-ons section. If you search for time report or timesheet then Jira will show a list of 3rd party plug-ins, which might help you find out this information.

    It's called the Atlassian Marketplace for Jira. If you want to search the web instead of internally in Jira, use this link: https://marketplace.atlassian.com That may be helpful for non-Jira admins to find plugins, which they can then suggest to their Jira admins to install.

    There are a lot of Jira timesheet plug-ins. From inside of Jira's search results: If you click each search results row, it expands & then shows screenshots on the right-hand side. Clicking on them loads up a modal, which contains a carousel of screenshots in it.

    One of them which might work for you is called Work Time Calculator. The middle screenshot (above the Configurable timesheets & excel export heading) shows the Worklog Day (column D) & Time Spent (column F).

  5. Timesheets might be useful. Here is one called Timesheet Reports and Gadgets for JIRA It installs as a Dashboard widget. Checkout the screenshot above the Time Sheet, Project Pivot and Worked Time Chart heading. It contains each date & how much time was logged per Jira ticket item, plus a total of the hours logged into that day for all tickets.

Good hunting! I hope that you find something that you like & works for your time reporting needs!

Update:

I've figured out how to extract this using SQL from the MySQL database. If you have access to PHPMyAdmin or another MySQL database tool, run SQL query:

SELECT CONCAT(p.pkey, '-', j.issuenum) as "Key", 
IF(timeworked < 3600, CONCAT(ROUND(timeworked/60), 'm'), 
CONCAT(ROUND(timeworked/(60*60), 2), 'h')) as "Time Logged",
DATE_FORMAT(w.created, "%r") as "When Logged" 
FROM `worklog` w, jiraissue j, project p 
WHERE w.issueid = j.id and j.project = p.id

Here is the sample output:

enter image description here

There are various date time format masks, which you can use.

Upvotes: 1

Sunny Tambi
Sunny Tambi

Reputation: 2483

Try this JQL

project = <your_project> AND issuetype in (Task, Sub-task) AND assignee = currentUser() AND (worklogDate >= 2017-06-01 AND worklogDate <= 2017-06-30)

Upvotes: -1

Related Questions