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

Paulo .O December 16, 2014

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 votes
Answer accepted
JamieA
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 Leaders.
December 17, 2014

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...

 

Deleted user February 2, 2015

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

JamieA
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 Leaders.
February 3, 2015

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.

Deleted user February 3, 2015

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

JamieA
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 Leaders.
February 3, 2015

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

Deleted user February 3, 2015

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.

0 votes
Paulo .O December 17, 2014

thanks

0 votes
Paulo .O December 17, 2014

It works fine.

Suggest an answer

Log in or Sign up to answer