Search for issues using JQL doesn't return worklog field like example.

Zohar Zhang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 22, 2019

I find this rest api can return issue with worklog field in example.

api-rest-api-3-search-get

When i test myself. I pass field: ['*all'] params. But there is no worklog field in my response. I have to send others requests to get issue worklogs. What should i do to get issue with worklog field in a JQL search request?

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 24, 2019

Hello Zohar,

Welcome to Atlassian community!

I understand that you are trying to return issues based on a JQL query using rest API, describing the amount of logged work you have on these issues. Is it correct?

Can please describe to us the exact query you are using and what issues you would like to return?

By default, the amount of work logged for the issues will be described in the "timespent" field if you simply set the JQL you want.

Example:

Let's suppose you would like to return the amount of work logged for the issue TEST-1. Here's the call you can perform, analyzing the timespent field:

https://yoursite.atlassian.net/rest/api/3/search?jql=key=test-3

Of course, you can also return only the field you want by defining it in the call:

https://yoursite.atlassian.net/rest/api/3/search?jql=key=test-3&fields=timespent

P.S: The amount of worklog entries will be returned in seconds so if you have 5 hours of work logged, the Rest API will return 18000.

Now, if you would like to return specific worklog entries for issues, you can use the call described in the link below:

Get issue worklogs

Let me know if this information helps.

Suggest an answer

Log in or Sign up to answer