The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am using Python and Jira REST APIs to get all the issues logged against a project and the worklogs corresponding to the issue
/rest/api/3/search
payload_dict['expand'] = []
payload_dict['jql'] = "project = TEST AND updated > '2020-01-01 00:00'"
field_list = [
"issuekey",
"issuetype",
"issuelinks",
"worklog"
]
payload_dict['maxResults'] = 100
When the worklog object is returned, i am getting below json object inside issues.fields.worklog. Since i am not getting the next Url for this nested worklog object, i am not sure how do i get remaining objects of the worklog, if it has more than 20.
Any suggestions will be helpful.
{
"startAt": 0,
"maxResults": 20,
"total": 200,
"worklogs": [
{
.
.
}
]
Hi @Vishal Biyani ,
I would recommend you to use issue search endpoint for getting only list of issues and then Get issue worklog endpoint for getting worklogs for each found issue. There are query parameters like startAt, maxResults etc. available.
@Hana Kučerová Thanks Hana. This is exactly what i ended up doing this. So if issue search returns, total records in worklog as say 38, i am firing the Get issue worklog to startAt 21 and get the remaining work log items
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vishal Biyani Did You figured out that issue.
If u Figured out issue please let me know.
Thanks in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Below is the high level approach i used,
1. I used below end point to get 100 results at a time and looped through the result set.
/rest/api/3/search
2. Check
if issue['fields']['worklog']['total'] > 20:
Then use /rest/api/3/issue/{ret_issue['key']}/worklog end point to get worklogs starting from 21st record
Note: As per Step 1, issuekey value is available in the json response ({ret_issue['key']})
Hope this helps
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looking forward to discus your doubts with you.
Let me know your email id, and i will message you.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can refer to this link for illustration on how to use the API
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.