How to create an Jira Filter to automatically calcute logged worked for each issue ?

Create an filter to find logged worked.

2 answers

1 accepted

This widget could not be displayed.
Alex Christensen Community Champion Jun 15, 2017

If you're on JIRA Server and have ScriptRunner installed, there's a JQL function you can use called aggregateExpression. Your JQL will look something like this:

project = TEST and issueFunction in aggregateExpression("Total Time Spent", "timeSpent.sum()")

Once you run the query, you'll see a box appear below the JQL search bar with this information.

timespentsum.PNG

More documentation on this here.

Thanks a lot, this function I was trying to find in Script Runner Documentation.. 

This widget could not be displayed.

Hi Jurgen,

JQL does not calculate data the same way a SQL SUM function would.  JQL is a query language that will only retrieve data.  Please see the Advanced Searching Fields Reference for more information about what fields JQL can search. 
In regards to calculating the time worked for each issue, the time tracking function will do that automatically when a user logs work.  Once they do that you should see something similar to the screenshot I attached:

Screen Shot 2017-06-15 at 10.28.51 AM.png

Hopefully this helps!


Cheers,

Branden

But now I have another question that I have questioned before. 
Can I use SQL to retrieve data from Jira DB in order to maker reports, calculate timetracking and stuff like this ? 

You can, but you won't like it.  Retrieving the data on-screen for a single issue can be 30-40 "joins" in SQL.  It would be far better and easier to find (or even write) an addon that can do the reporting you need.

Nic thanx again for your quick response, I explained the problem here at my office but they think that this is smth nice to have because everyone can do those reports, so that's why I aksed Brenden if he had any idea helping me out.

Or if I will try to write an add-on by myself, what programming language should I use ? 

JIRA is written in Java, so add-ons are easiest to write in that.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

207 views 3 0
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you