From 546ab95dfd65734012f9c51f2a3bf7e0890817cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 3 Jun 2025 16:38:41 +0200 Subject: [PATCH 1/6] version to 1.8.1-snapshot for post 1.8.0 changes --- package-lock.json | 4 ++-- package.json | 2 +- src/version.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3d16ca1..11cca80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gitlab-time-tracker", - "version": "1.8.0-snapshot", + "version": "1.8.1-snapshot", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "gitlab-time-tracker", - "version": "1.8.0-snapshot", + "version": "1.8.1-snapshot", "license": "GPL-2.0", "dependencies": { "@inquirer/select": "^4.2.3", diff --git a/package.json b/package.json index 2af31bf..4b9d29a 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gitlab-time-tracker", - "version": "1.8.0-snapshot", + "version": "1.8.1-snapshot", "type": "module", "description": "A command line interface for GitLabs time tracking feature.", "bugs": { diff --git a/src/version.js b/src/version.js index 95ab9d8..25398e5 100644 --- a/src/version.js +++ b/src/version.js @@ -1 +1 @@ -let version = '1.8.0-snapshot'; export default version; +let version = '1.8.1-snapshot'; export default version; From 86681f46a305c63d805fb6cda4e6f5326965a1d7 Mon Sep 17 00:00:00 2001 From: ndu Date: Fri, 1 Aug 2025 11:35:03 +0200 Subject: [PATCH 2/6] document limitation on work items --- documentation.md | 7 +++++-- readme.md | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/documentation.md b/documentation.md index 6a24e5b..f6c0b9e 100644 --- a/documentation.md +++ b/documentation.md @@ -23,9 +23,12 @@ ## features * command line - * create reports in various formats from time tracking data stored on GitLab + * create reports in various formats from time tracking data stored on GitLab (issues and merge requests) * monitor the time you spent on an issue or merge request locally and syncs the data to GitLab +### limitations + + Time tracking for other work items (e.g. tasks, epics) is currently not supported. See also https://github.com/ndu2/gitlab-time-tracker/issues/33 ## requirements @@ -617,7 +620,7 @@ freeLabels: - at no charge - free -# labels charing half price only +# labels charging half price only halfPriceLabels: - at half price - at half-price diff --git a/readme.md b/readme.md index 870f0ae..8b5a4c9 100755 --- a/readme.md +++ b/readme.md @@ -31,6 +31,10 @@ By this time of writing: How to install and use gtt? You can find the documentation [here](documentation.md). +### limitations + +Time tracking for other work items (e.g. tasks, epics) is currently not supported. + ## license From e377e67d09a25cc4c152e10f96e47cff00bb6a99 Mon Sep 17 00:00:00 2001 From: ndu Date: Fri, 1 Aug 2025 11:34:55 +0200 Subject: [PATCH 3/6] adapt gitlab note parse regex to gitlab 18.x --- src/models/hasTimes.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/models/hasTimes.js b/src/models/hasTimes.js index dfd5c91..0bdedbe 100755 --- a/src/models/hasTimes.js +++ b/src/models/hasTimes.js @@ -4,9 +4,9 @@ import Base from './base.js'; import Time from './time.js'; import DayReport from './dayReport.js'; -const regex = /added (.*) of time spent(?: at (.*))?/i; -const subRegex = /subtracted (.*) of time spent(?: at (.*))?/i; -const delRegex = /deleted (.*) of spent time(?: from (.*))?/i; +const regex = /added (.*) of time spent(?: at ([0-9-]*))?/i; +const subRegex = /subtracted (.*) of time spent(?: at ([0-9-]*))?/i; +const delRegex = /deleted (.*) of spent time(?: from ([0-9-]*))?/i; const removeRegex = /Removed time spent/i; /** From c5676922ac0ef8001a86f3c1eb22b586aa7d7f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 4 Sep 2025 14:40:20 +0200 Subject: [PATCH 4/6] v1.8.1 --- package.json | 2 +- src/version.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4b9d29a..4d015e2 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gitlab-time-tracker", - "version": "1.8.1-snapshot", + "version": "1.8.1", "type": "module", "description": "A command line interface for GitLabs time tracking feature.", "bugs": { diff --git a/src/version.js b/src/version.js index 25398e5..f2915e1 100644 --- a/src/version.js +++ b/src/version.js @@ -1 +1 @@ -let version = '1.8.1-snapshot'; export default version; +let version = '1.8.1'; export default version; From 9b5cbbcf2e803aaf4421f1b31916cbe18c9a4894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 4 Sep 2025 15:14:13 +0200 Subject: [PATCH 5/6] set version to 1.8.2-snapshot --- package.json | 2 +- src/version.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4d015e2..f2f4a68 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gitlab-time-tracker", - "version": "1.8.1", + "version": "1.8.2-snapshot", "type": "module", "description": "A command line interface for GitLabs time tracking feature.", "bugs": { diff --git a/src/version.js b/src/version.js index f2915e1..2f67589 100644 --- a/src/version.js +++ b/src/version.js @@ -1 +1 @@ -let version = '1.8.1'; export default version; +let version = '1.8.2-snapshot'; export default version; From 707a2f1a30958b3203544f32e1052343bea753c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Wed, 3 Dec 2025 10:58:53 +0100 Subject: [PATCH 6/6] documentation examples, more realistic --to date --- documentation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation.md b/documentation.md index f6c0b9e..499790f 100644 --- a/documentation.md +++ b/documentation.md @@ -90,7 +90,7 @@ docker run \ --rm -it \ -v ~/.local/share/.gtt/:/home/gtt/.local/share/.gtt \ gitlab-time-tracker:latest \ - report "ourorganization/aproject" --user=xxxx --from="2020-04-01" --to="2020-06-30" + report "ourorganization/aproject" --user=xxxx --from="2020-04-01" --to="2020-07-01" ``` @@ -290,7 +290,7 @@ chromium --headless --run-all-compositor-stages-before-draw --print-to-pdf-no-he There are additional options for the invoice output as given in the following example: ```shell -gtt report --output=invoice --file=invoice.md --from 2021-02-01 --to 2021-02-28 --closed --invoiceCurrencyMaxUnit 1 --invoiceTitle "Rechnung" --invoiceReference "Reference" --invoiceAddress "Firma" "Mr. X" "Strasse" "10000 Ort" "Land" --invoiceCurrency "EUR" --invoiceCurrencyPerHour "50" --invoiceVAT "0.15" --invoiceDate "1.03.2021" --invoicePositionText "Position Text" +gtt report --output=invoice --file=invoice.md --from 2021-02-01 --to 2021-03-01 --closed --invoiceCurrencyMaxUnit 1 --invoiceTitle "Rechnung" --invoiceReference "Reference" --invoiceAddress "Firma" "Mr. X" "Strasse" "10000 Ort" "Land" --invoiceCurrency "EUR" --invoiceCurrencyPerHour "50" --invoiceVAT "0.15" --invoiceDate "1.03.2021" --invoicePositionText "Position Text" ``` For paper invoice, further process the output with a css, see the folder preview (styles.css, invoice.pdf)