Resolve API access issues for Jira Cloud worklog information
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
When using the Jira work item search API endpoint with the "fields=worklog" parameter, you notice that for one or more projects, the work items don't show any worklog information in the API response. The response is visible in other projects in the instance.
Example:
https://instancename.atlassian.net/rest/api/3/search?fields=worklog&jql=project%20=%20Test
Diagnosis
The worklog information is visible in the Jira work item view
You have the permission to Work On Issues for the project
You are able to create new worklog entries on the project work items
Cause
The Log Work field is hidden in the project's field configuration. Due to this configuration, the API response does not include any worklog field information.
Solution
To view the worklog information via API, please ensure that the Log work field is not hidden in the field configuration.
Use the following steps to set this:
Navigate to Project > Project Settings
Select Work Items > Fields
Choose ⚙ Actions > Edit Fields
Click on Show to unhide the field
Note: A field configuration can be shared with multiple projects. So if the field is hidden in a particular field configuration, then the API response for all work items with projects associated with this field configuration will showcase similar behaviour.
Was this helpful?