fix: Vikunja task resolution pagination in post_merge.py #7

Merged
emil merged 0 commits from GRM-28-fix-vikunja-pagination into master 2026-06-20 17:48:09 +00:00
Owner

The resolve_task_id function in post_merge.py only fetched 50 tasks via list_tasks(per_page=50). With more than 50 tasks in Vikunja, newly created tasks (with higher IDs) were not in the first page and could not be found.

Fix:

  • Add VikunjaClient.list_project_tasks() using the project-specific endpoint GET /projects/{id}/tasks
  • Update resolve_task_id to paginate through all pages until the task is found or pages are exhausted
  • Add tests for pagination (found on page 2, stops on partial page)
The `resolve_task_id` function in `post_merge.py` only fetched 50 tasks via `list_tasks(per_page=50)`. With more than 50 tasks in Vikunja, newly created tasks (with higher IDs) were not in the first page and could not be found. **Fix:** - Add `VikunjaClient.list_project_tasks()` using the project-specific endpoint `GET /projects/{id}/tasks` - Update `resolve_task_id` to paginate through all pages until the task is found or pages are exhausted - Add tests for pagination (found on page 2, stops on partial page)
emil merged commit 3364355c73 into master 2026-06-20 17:48:09 +00:00
emil deleted branch GRM-28-fix-vikunja-pagination 2026-06-20 17:48:09 +00:00
Sign in to join this conversation.