arjasepp opened a new issue, #9122: URL: https://github.com/apache/devlake/issues/9122
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar issues. ### What happened Jira issue worklogs are not collected by DevLake when a Jira issue has fewer than 20 worklogs. Issues with 20+ worklogs are collected correctly. Steps to reproduce 1. Configure a Jira connection and scope with worklog collection enabled. 2. Trigger a pipeline run. 3. Observe that worklogs for Jira issues with fewer than 20 worklogs do not appear in the jira_issue_worklogs table. Expected behavior All worklogs for all issues should be collected, regardless of the total worklog count per issue. Actual behavior Issues with fewer than 20 worklogs have no entries in jira_issue_worklogs. For example, an issue with 7 worklogs returns 0 rows after a full pipeline run. Root cause hypothesis The Jira REST API's worklog endpoint (GET /rest/api/2/issue/{issueId}/worklog) paginates results with a default maxResults of 20. The response body includes a total field alongside maxResults and startAt. If the collection logic only follows up with paginated requests when total > maxResults — but skips fetching the first page altogether under some condition — then issues with total < 20 may be silently skipped. Alternatively, if worklogs are collected via the bulk-updated worklogs endpoint (/rest/api/2/worklog/updated) and an issue's worklogs fall below a threshold that triggers a different code path, the same silent skip could occur. Environment - DevLake version: v1.0.3-beta14 (or the version you are running) - Jira plugin version: bundled - Jira Server on premise Additional context Confirmed on a real project: one Jira issue has exactly 7 worklogs; none are present in the database after a successful pipeline run. Issues on the same board with higher worklog counts collect correctly. ### What do you expect to happen All worklogs for all issues should be collected, regardless of the total worklog count per issue. ### How to reproduce 1. Configure a Jira connection and scope with worklog collection enabled. 2. Trigger a pipeline run. 3. Observe that worklogs for Jira issues with fewer than 20 worklogs do not appear in the jira_issue_worklogs table. ### Anything else I got this error when trying to understand if it is possible to get worklogs also from jira to devlake. Problem is that I do not have tasks that have more than 20 worklogs. All this text is generated by AI, but as far as I understand, then problem is there, if not, then sorry for bothering. ### Version v1.0.3-beta14@50f664e ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
