Skip to content

ITK-Leantime/leantime-dataexport

Folders and files

NameName
Last commit message
Last commit date
Sep 16, 2024
Sep 10, 2024
Mar 13, 2024
Sep 9, 2024
Jun 20, 2024
Sep 18, 2024
Mar 7, 2024
Sep 16, 2024
Mar 14, 2024
Mar 26, 2025
Mar 25, 2025
Sep 16, 2024
Mar 25, 2025
Sep 16, 2024
Mar 25, 2025
Mar 5, 2024
Mar 26, 2024
Jun 19, 2024
Sep 3, 2024

Repository files navigation

Data export

Data export plugin for Leantime

Installation

Download a release from https://github.com/ITK-Leantime/leantime-dataexport/releases and extract into your Leantime plugins folder, e.g.

curl --silent --location https://github.com/ITK-Leantime/leantime-dataexport/releases/download/0.0.2/leantime-dataexport-0.0.2.tar.gz | tar xv

Install and enable the plugin:

bin/leantime plugin:install leantime/dataexport --no-interaction
bin/leantime plugin:enable leantime/dataexport --no-interaction

Usage

Go to Company > All Timesheets (/timesheets/showAll) or My Work > Timesheets (/timesheets/showMy) and enjoy the new exports:

Export buttons

Note: Go to Settings (/users/editOwn#settings) and save to refresh plugin translations.

Development

Clone this repository into your Leantime plugins folder:

git clone https://github.com/itk-leantime/leantime-dataexport app/Plugins/DataExport

Install plugin dependencies:

cd app/Plugins/DataExport
docker compose run --interactive --rm --volume ${PWD}:/app phpfpm composer install --no-dev

Install and enable the plugin:

bin/leantime plugin:install leantime/dataexport --no-interaction
bin/leantime plugin:enable leantime/dataexport --no-interaction

Run composer install

docker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer install

Composer normalize

docker run --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer normalize

Coding standards

Check and apply with phpcs

docker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer coding-standards-check
docker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer coding-standards-apply

Check and apply with prettier

docker run --rm -v "$(pwd):/work" tmknom/prettier:latest --check assets
docker run --rm -v "$(pwd):/work" tmknom/prettier:latest --write assets

Check and apply markdownlint

docker run --rm --volume "$PWD:/md" itkdev/markdownlint '**/*.md'
docker run --rm --volume "$PWD:/md" itkdev/markdownlint '**/*.md' --fix

Check with shellcheck

docker run --rm --volume "$PWD:/app" --workdir /app peterdavehello/shellcheck shellcheck bin/create-release
docker run --rm --volume "$PWD:/app" --workdir /app peterdavehello/shellcheck shellcheck bin/deploy
docker run --rm --volume "$PWD:/app" --workdir /app peterdavehello/shellcheck shellcheck bin/local.create-release

Code analysis

# This analysis takes a bit more than the default allocated ram.
docker run --interactive --rm --volume ${PWD}:/app --env PHP_MEMORY_LIMIT=256M itkdev/php8.3-fpm:latest composer code-analysis

Test release build

docker compose build && docker compose run --rm php bin/create-release dev-test

The create-release script replaces @@VERSION@@ in register.php and Services/DataExport.php with the tag provided (in the above it is dev-test).

Deploy

The deploy script downloads a release from Github and unzips it. The script should be passed a tag as argument. In the process the script deletes itself, but the script finishes because it is still in memory.