A small Leantime plugin that adds a "copy link" button to the ticket modal. Clicking the button copies a context-free URL to the clipboard:
https://your-leantime.example/#/tickets/showTicket/14
— rather than the contextual URL the user happens to be on when they open
the modal (e.g. …/ProjectOverview?view=view_abc…#/tickets/showTicket/14).
The plain link opens the ticket directly from the frontpage, without first
loading whatever page the linker happened to be on.
On every authenticated page load, the asset is included via the standard
afterScriptLibTags event.
The script listens for hashchange. When the hash matches #/tickets/showTicket/<id>, the script waits for nyroModal's
.nyroModalCont wrapper to render and injects a button into it.
The button uses the async clipboard API (with a document.execCommand('copy') fallback
for non-HTTPS contexts) and flashes success / error styling for ~1.5 s.
Enable the plugin from Company Settings → Leantime Apps → My apps. The plugin's install() hook
symlinks assets/copy-ticket-link.js and assets/copy-ticket-link.css into
public/dist/ so the asset URLs resolve.
No configuration is required.
Disabling the plugin removes the symlinks.
Clone this repository into your Leantime plugins folder:
git clone https://github.com/ITK-Leantime/copy-ticket-link.git app/Plugins/CopyTicketLinkRun composer install:
docker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer installdocker run --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer normalizedocker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer coding-standards-checkdocker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer coding-standards-applydocker run --rm -v "$(pwd):/work" tmknom/prettier:latest --check assetsdocker run --rm -v "$(pwd):/work" tmknom/prettier:latest --write assetsdocker run --rm --volume "$PWD:/md" itkdev/markdownlint '**/*.md'docker run --rm --volume "$PWD:/md" itkdev/markdownlint '**/*.md' --fixdocker 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# 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-analysisdocker compose build && docker compose run --rm php bin/create-release dev-testThe create-release script replaces %%VERSION%% in
register.php
with the tag provided (in the above it is dev-test).
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.