The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

SQL query to get imputed time

Eva Fernández
November 16, 2016

Good Morning,

I need to get the time allocated by user and project, filtering by dates.

How do I get it through an sql query?

The imputed time table is "worklog", but I need to cross the Author with the username, and the TIMEWORKED in hours.

Thank you very much,
Greetings from Spain!
Eve

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Contact Kintosoft
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 18, 2016

Alternatively you can use the SQL for JIRA Driver which is easier and lesser risks than accessing to the JIRA native database. Furthermore, since the 3.1 version, the users' worklogs are supported in the Data Analysis console so you can summarize and filter users' work logs with drag&drop, view results as charts, etc.

Eva Fernández
November 21, 2016

thanks!!!

0 votes
Eva Fernández
November 16, 2016

I have the following:

select
jira.cwd_user.DISPLAY_NAME USUARIO, jira.customfieldvalue.TEXTVALUE CENTRO_DE_COSTE, round(jira.worklog.timeworked/3600,2) Horas
from
jira.worklog ,
jira.cwd_user,
jira.jiraissue,
jira.customfieldvalue

where
jira.cwd_user.user_name = jira.worklog.author and
jira.jiraissue.id = jira.worklog.issueid and
jira.customfieldvalue.issue = jira.jiraissue.id
and
startdate > '07/06/15'

 

But I need to get the total time per person and date.

image2016-11-17 9:40:43.png