Hi there,
I've set up an automation rule to invoke a webhook triggered by any update in the worklog. It works fine, but after 20 entries I got always the same 20 entries. I've seen some posts related to limitation of 20 entries when using REST API to fetch worklogs from Jira, but I'm not sure if the problem (date back 2014 in some posts...) is the same, because in my case I'm not fetching Jira, but being invoked (webhooked) . Can someone give some directions?
Tks
Hi @Julio Ribeiro -- Welcome to the Atlassian Community!
Are you asking about this REST API method: https://docs.atlassian.com/software/jira/docs/api/REST/1000.824.0/#api/2/issue-getIssueWorklog
If so, this method uses pagination, like many of the REST API ones. You would need to use startAt to grab the results, page by page.
And also, what problem are you trying to solve by doing this? Knowing that may help the community to offer you suggestions. Thanks!
Kind regard,
Bill
Hi @Julio Ribeiro and welcome to the community
can you elaborate more about the webhook you are using, i'm a bit confused about the 20 entries while you are not fetching worklog
Regards
Adel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mohamed Adel , thank you
The webhook I'm using was set in a project rule (automation) as a Global rule.
The automation rule is triggered whenever a worklog change, and that is working perfectly. As a response to this event, a webhook call is made and a POST request with the entire issue data (in Jira format) is sent to a remote webserver.
However, I've noticed that when the issue has more than 20 worklog entries , for example, 24 entries that I can confirm via UI (issue activity worklog), the object in the Jira data payload received (issue.fields.worklog.worklogs) contains only the first 20 entries. The other 4 entries isn't listed.
Way to reproduce:
1. create a global (or project) rule automation that is fired when a issue change the fields value of worklog, and set the action to be send a webhook to an endpoint you can check later the data you receive. (you can mockup on requestbin.com)
2. Create an issue and insert 20 entries in its worklog and check the visually (via UI, open issue and see in "activity" , "worklog")
3. Insert a new worklog in the issue to fire the automation rule again or simulate it by clicking and filling the "validate your web request configuration" in the rule action (see first print)
4. Check in the remote webserver the (json) payload data received, and look at the path root/issue/fields/worklog/worklogs, as the second print above. You'll see the total of +20 entries, but can list only 20 of them.
I hope this helps to explain better
Thks
Julio Ribeiro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As already noted, the REST API uses pagination to return values, helping to manage performance when there are many results. When you need all of the values, use the startAt parameter to page through the entries.
To back up a bit: what problem are you trying to solve?
If you only need the last value, based on your trigger of Work Logged, you can use the smart values to get that information: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--worklog--
Thanks,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.