This is a lightweight PHP application that listens for Vikunja webhook events and automatically updates task timestamps based on their movement between buckets. Specifically, it records the start time when a task moves from "backlog" to "in progress" and the end time when it moves to "done."
- Listens for
task.updatedevents from Vikunja. - Detects when a task moves between buckets.
- Sets
start_datewhen a task leaves the backlog. - Sets
end_datewhen a task is moved to done. - Uses PHP's built-in web server (
php -S) for quick deployment.
- PHP 8.0 or later
- cURL extension enabled
- A running Vikunja instance with webhook support
- 3 buckets:
- Backlog
- A middle one bucket
- Done
- Clone this repository:
git clone https://github.com/EnMaster/vikunja-auto-timestamps.git cd vikunja-auto-timestamps - Copy the
.env.examplefile and configure your Vikunja API credentials:cp .env.example .env
- Start the PHP built-in server or copy in your web server:
php -S 0.0.0.0:8080
- Configure your Vikunja webhook to point to
http://yourserver:8080.
The application need environment variables to configure API access. These should be defined in a .env file:
VIKUNJA_URL=https://your-vikunja-instance/api/v1/
VIKUNJA_TOKEN=your_api_tokenYou can run the script in a lightweight Docker container:
docker build -t vikunja-webhook .
docker run -p 8080:8080 --env-file .env vikunja-webhook- Ensure that your Vikunja instance is configured to send webhooks. You only need the
task.updater - This script does not store data locally; all updates are made via the Vikunja API, so you need create an API Key from Vikunja GUI.
- Add control to track which bucket a task is moving from and to.
- Allow customization of the start and end bucket definitions.
- Improve logging and error handling.