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

Hi,
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

0 vote

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

642 views 6 12
Read article

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