I just wrote this exact query for an internal requirement ; glad to share. Assuming you have the most recent version of Jira, the following should work for you...
This Month (remove AND... for all time):
worklogAuthor = currentUser() AND worklogDate >= startOfMonth()
Specific date (replace date with endOfDay() for Today):
worklogAuthor = currentUser() AND worklogDate = "2015/07/10"
Note: Valid date formats include: 'YYYY/MM/DD', 'YYYY-MM-DD', or a period format e.g. '-5d', '4w 2d'.
Hope this helps.
Many thanks for the above but it also shows work done on another day and adds it for the day it was logged. For e.g. if I worked on an issue yesterday and today, today's report will show a sum of work logged yesterday and today. Can we not have it showing the time added for a specific day only?
Many thanks for your time and inputs on this one.
@Carl DiClementi thanks for that JQL.
I used the worklogDate to search between two dynamic dates like this:
(worklogDate >= startOfWeek() AND worklogDate <= endOfWeek())
Pop the, "Time Spent" field into the filter to see the total time spent on the item within the time period.
Note: You cannot ask to see multiple issues listed if someone enters time logged on a Monday & Wednesday it will show you the total time spent. If someone really had specific questions, then they will have to open the work log and view when the time was logged.
@Benjamin Dains Ah, well I was hoping that pop meant something more along the lines of return this data for the query.
I use Google Sheets do to time tracking, invoicing, and accounting. I am looking at using JIRA in the workflow.
In order to do that, I am exploring the interfaces of the Atlassian data I would need. JIRA Query Language + Filter (Columns) gets me about there.
Now connecting that to Google Sheets, perhaps via REST.
As author of Timesheet Reports and Gadgets for Jira, I'd like to let you know about extracting time tracking data from Jira via REST, please see https://www.primetimesheet.net/cloud/REST_endpoint.html.
Beside that, I've recently created script that can be run standalone, or deployed to cloud (e.g. heroku), please see it here, and feel free to use it as you wish.
Note, I'm often asked for functionality to import timesheet data into Google Sheets, so it could be useful, if you share more details about your use case, and I eventually implement it in add-on, or you share with community your code for connecting it with Google Sheets.
Thanks for the scripts!
For lightly extending JIRA, I believe it makes sense to expose project-specific data to spreadsheet front-end. Even if as an intermediary toward a headless automated system, the spreadsheet is a useful tool for visualizing data.
Each client has a different workflow. The first, I bill tasks against a PO until the hours are spent, invoice with the work log. So it would be useful to know the total hours toward an account and the remaining hours left.
The second is monthly billed to multiple accounts, which I separate by tasks. JIRA is sufficient for generating this type of reporting so long as I generate new tasks for each month due to the limitation described below.
The JQL resolution for worklogDate is not granular to when work is actually logged. So if I create a query for >= date, with some time logged before and after that date, it will show all of the hours associated with that task in the query report. It should show only the hours and activity during the time period specified.
This REST function, Get ids of worklogs modified since, of the Jira API appears to be the most relevant for filtering worklogs by date:
curl -D- -u "user:passwd" -X GET -H "Content-Type: application/json" http://localhost:8080/rest/api/2/worklog/updated?since=1518487098103
From here, we get a list of worklog ids to query for the user, time, and comment. That is all that's necessary to generate the worklog report with ongoing time spent on issues.
One small snag is that it is not possible to extract the Issue Summary from the worklogs, so we have to worklogIds -> issueIds -> jql : issue in (<issue ids>) separately and match them up later. Three REST queries to get the data in this fashion.
There is probably a more nuanced approach which could do a single JQL worklogDate REST query then filter the individual worklog entries by comparing timestamps.
I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs