Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

expand option in worklog JIRA rest api not working

Amrendra Kumar February 18, 2022

I am using following documentation and everthing work except "expand" options. Does anyone got this working successfully? Whatever value I supply, property attribute is always an empty array.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-worklogs/#api-rest-api-3-worklog-updated-get

2 answers

1 accepted

0 votes
Answer accepted
Hana Kučerová
Community Champion
February 19, 2022

Hi @Amrendra Kumar ,

yes, it works for me.

expand.png

Amrendra Kumar February 20, 2022

Hi @Hana Kučerová , this still does not work for me. As @Leeland Clay asked, is this based on some kind of setting in the system? 

And my assumption around expand is that we get the actual values for these work logs (a la carte basis, such as author name, a logged time, issue number, etc), so I don't have to make separate calls to expand the worklog properties.  In your example, I don't see those values too.

Documentation is pretty vague and seems incomplete around the expand attribute.

 

2022-02-20 12_52_29-.png

Hana Kučerová
Community Champion
February 20, 2022

Hi @Amrendra Kumar ,

if you want to get worklog details such as author, issue etc., it is neccessary to use REST API endpoint Get worklogs

It is possible, that your worklog properties are empty, because these are custom data, not worklog details.

Leeland Clay
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!
February 20, 2022

Just to verify, if I wanted to get additional information, I would need to iterate over the results of the worklogs/list api results and then use the Get Worklogs endpoint for each item. Is that correct?

Hana Kučerová
Community Champion
February 20, 2022

@Leeland Clay you should be able to send list of worklog ids in one request to Get worklogs endpoint (according to the documentation limit is 1000 worklog ids).

0 votes
Leeland Clay
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!
February 19, 2022

Is there a special configuration needed to make this work? I'm also not able to view any expanded properties. I'm using "/rest/api/3/worklog/updated?expand=properties&since=1645224295000" and I'm getting an empty properties array as well.

Andrew
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!
April 4, 2024

I've just been down this path too with expand=properties not adding information.

This page on the issue worklog properties filled in some information on how to fille properties with custom data. I'm not planning to do this.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-worklog-properties/#api-rest-api-3-issue-issueidorkey-worklog-worklogid-properties-get

I reverted to 

  1. Get IDs of updated worklogs (since epoch date)
  2. Pass those IDs to "Get worklogs" (same page)
  3. Get the issueId for each worklow and get extra information about the ticket (summary etc)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events