1.6 KiB
1.6 KiB
name, description, metadata
| name | description | metadata | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| vikunja-reset-completed-tasks | Reset all completed tasks in a Vikunja project to pending state via API. |
|
Vikunja Reset Completed Tasks Skill
Reset all completed (done: true) tasks in a specified Vikunja project to pending (done: false).
Environment Variables
VIKUNJA_API_URL= Base URL for Vikunja API (e.g., http://localhost:3456/api/v1)VIKUNJA_API_TOKEN= Bearer token from Vikunja user settings
Parameters
project_id: The numeric ID of the Vikunja project to process (required)
Workflow
- List all tasks in the specified project using
GET /projects/{project_id}/tasks - For each task where
doneis true, send a POST request to/tasks/{task_id}with body{"done": false} - Report success and failure counts
Example Usage
# Reset completed tasks in project ID 5 (资料收集)
vikunja-reset-completed-tasks 5
Implementation Notes
- Uses
curlfor HTTP requests andpython3for JSON parsing - Handles pagination implicitly by relying on the API's default page size (adjust per_page if needed for large projects)
- Must be run in an environment with the required variables set
- Follows Vikunja API authentication via Bearer token in Authorization header
Error Handling
- Reports HTTP status codes and response bodies for failed requests
- Continues processing remaining tasks even if some fail
- Validates that project_id is provided and numeric
Related Skills
vikunja: Core Vikunja task management skill