Skip to content

EnMaster/vikunja-auto-timestamps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vikunja Auto Timestamps

Description

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."

Features

  • Listens for task.updated events from Vikunja.
  • Detects when a task moves between buckets.
  • Sets start_date when a task leaves the backlog.
  • Sets end_date when a task is moved to done.
  • Uses PHP's built-in web server (php -S) for quick deployment.

Requirements

  • PHP 8.0 or later
  • cURL extension enabled
  • A running Vikunja instance with webhook support
  • 3 buckets:
    • Backlog
    • A middle one bucket
    • Done

Installation

  1. Clone this repository:
    git clone https://github.com/EnMaster/vikunja-auto-timestamps.git
    cd vikunja-auto-timestamps
  2. Copy the .env.example file and configure your Vikunja API credentials:
    cp .env.example .env
  3. Start the PHP built-in server or copy in your web server:
    php -S 0.0.0.0:8080
  4. Configure your Vikunja webhook to point to http://yourserver:8080.

Environment Variables

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_token

Deployment with Docker

You can run the script in a lightweight Docker container:

docker build -t vikunja-webhook .
docker run -p 8080:8080 --env-file .env vikunja-webhook

Notes

  • 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.

Roadmap

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors