How it works? .and().timeSpent().eq( ,

I would like know how works the timeSpent condition in JQL.

When i get timeSpent values with issue.getTimeSpent() i get, for example, 28000 (seconds) value, but when I want search it with jql with builder.where().and().timeSpent().isNotEmpty().and().timeSpent().eq(new Long(28000) ); it doesn't work.
How could make I a correct jql query to get the correct result?
or what is the right way to get it?

Thanks in advance.


3 answers

1 accepted

Accepted Answer
0 votes

I think it will expect the same format that you enter in the advanced search. So try: eq("1d")... 

I don't think they will be interchangeable as you are trying...


Hi Jamie, can you please tell me how can i fetch worklog (timespent) for a specific user. I try with the aggregateExpression("Time", "Timespent.sum()"). This gaves me all time that was worked on the issue. All what i want is to get the worklog time for a specific user on that issue. Tried with this, but i get the full worked time: issueFunction in workLogged("by charlie") AND issueFunction in aggregateExpression("Time spent on this issue/issues", "timespent.sum()") Do you have any idea how to achieve this? Best Regards, Ivan

Sorry, that is an outstanding issue... there is not currently a way to retrieve specific worklogs short of writing your own report. The "workLogged" function lets you search for issues with specific worklogs, but the entire issue is retrieved with all its worklogs. I think the solution would be to allow aggregateExpression to filter the worklogs.

Thanks Jamie, I will try this and see what can I do.

I don't think there's anything you can do atm... aggExp only allows a limited set of methods/properties.

I think that in the end I will need to make a sql query to fetch that data and put it into some kind of custom field, will see what can I do.

It works fine.


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

27,128 views 2 7
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