jira-daily-report 0.1.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CLI.md ADDED
@@ -0,0 +1,296 @@
1
+ # Jira Daily Report - CLI Documentation
2
+
3
+ The Jira Daily Report tool now supports both VS Code extension and command-line interface (CLI) usage!
4
+
5
+ ## Installation
6
+
7
+ ### Global Installation (Recommended for CLI)
8
+ ```bash
9
+ npm install -g jira-daily-report
10
+ ```
11
+
12
+ ### Local Installation
13
+ ```bash
14
+ npm install jira-daily-report
15
+ # Use via: npx jira-report
16
+ ```
17
+
18
+ ## Quick Start
19
+
20
+ ### 1. Initialize Configuration
21
+ ```bash
22
+ jira-report config init
23
+ ```
24
+
25
+ This creates a `.jira-report.json` file in your current directory with the following template:
26
+ ```json
27
+ {
28
+ "jiraServer": "https://your-domain.atlassian.net/",
29
+ "username": "your-email@example.com",
30
+ "apiToken": "your-jira-api-token",
31
+ "jiraTempoToken": "your-tempo-api-token",
32
+ "whoAmI": "Developer",
33
+ "autoClipboard": true
34
+ }
35
+ ```
36
+
37
+ ### 2. Configure Your Credentials
38
+
39
+ **Option A: Edit Config File**
40
+ Edit `.jira-report.json` and add your credentials:
41
+ - **Jira API Token**: Get from https://id.atlassian.com/manage-profile/security/api-tokens
42
+ - **Tempo API Token**: Get from https://apidocs.tempo.io/#section/Authentication
43
+
44
+ **Option B: Use Environment Variables**
45
+ ```bash
46
+ export JIRA_SERVER="https://your-domain.atlassian.net/"
47
+ export JIRA_USERNAME="your-email@example.com"
48
+ export JIRA_API_TOKEN="your-jira-api-token"
49
+ export TEMPO_API_TOKEN="your-tempo-api-token"
50
+ export WHO_AM_I="Developer" # or "QC"
51
+ ```
52
+
53
+ ### 3. Generate Your Report
54
+ ```bash
55
+ jira-report generate
56
+ ```
57
+
58
+ ## CLI Commands
59
+
60
+ ### `jira-report generate`
61
+ Generate daily standup report
62
+
63
+ **Options:**
64
+ - `-o, --output <file>` - Save report to file instead of console
65
+ - `-f, --format <type>` - Output format: `text` (default), `json`, or `markdown`
66
+ - `-c, --clipboard` - Copy report to clipboard (requires clipboardy package)
67
+ - `-s, --silent` - Suppress info messages
68
+ - `--no-cache` - Disable caching
69
+
70
+ **Examples:**
71
+ ```bash
72
+ # Basic usage - outputs to console
73
+ jira-report generate
74
+
75
+ # Save to file
76
+ jira-report generate -o report.txt
77
+
78
+ # Generate JSON format
79
+ jira-report generate -f json -o report.json
80
+
81
+ # Copy to clipboard
82
+ jira-report generate -c
83
+
84
+ # Silent mode (only show report)
85
+ jira-report generate -s
86
+ ```
87
+
88
+ ### `jira-report config`
89
+ Manage configuration files
90
+
91
+ **Subcommands:**
92
+
93
+ #### `jira-report config init`
94
+ Initialize a new config file
95
+
96
+ **Options:**
97
+ - `-g, --global` - Create config in home directory (`~/.jira-report.json`)
98
+
99
+ **Examples:**
100
+ ```bash
101
+ # Create local config
102
+ jira-report config init
103
+
104
+ # Create global config
105
+ jira-report config init --global
106
+ ```
107
+
108
+ #### `jira-report config show`
109
+ Display current configuration with masked secrets
110
+
111
+ **Example:**
112
+ ```bash
113
+ jira-report config show
114
+ ```
115
+
116
+ Output:
117
+ ```
118
+ Current Configuration:
119
+ ──────────────────────────────────────────────────
120
+ Jira Server: https://company.atlassian.net/
121
+ Username: john@example.com
122
+ API Token: ABCD****WXYZ
123
+ Tempo Token: 1234****5678
124
+ User Type: Developer
125
+ Auto Clipboard: true
126
+
127
+ Config File Locations:
128
+ ✓ /home/user/project/.jira-report.json
129
+ ✗ /home/user/.jira-report.json
130
+
131
+ Environment variables take precedence over config files.
132
+ ```
133
+
134
+ ## Configuration Priority
135
+
136
+ Configuration is loaded in the following order (highest priority first):
137
+
138
+ 1. **Environment Variables** (highest priority)
139
+ - `JIRA_SERVER`
140
+ - `JIRA_USERNAME`
141
+ - `JIRA_API_TOKEN`
142
+ - `TEMPO_API_TOKEN`
143
+ - `WHO_AM_I`
144
+ - `AUTO_CLIPBOARD`
145
+
146
+ 2. **Local Project Config**
147
+ - `./.jira-report.json` (current directory)
148
+
149
+ 3. **User Home Config** (lowest priority)
150
+ - `~/.jira-report.json`
151
+
152
+ ## Configuration Options
153
+
154
+ | Option | Required | Description | Default |
155
+ |--------|----------|-------------|---------|
156
+ | `jiraServer` | Yes | Jira instance URL | - |
157
+ | `username` | Yes | Jira username (email) | - |
158
+ | `apiToken` | Yes | Jira API token | - |
159
+ | `jiraTempoToken` | Yes | Tempo API token | - |
160
+ | `whoAmI` | No | User type: "Developer" or "QC" | "Developer" |
161
+ | `autoClipboard` | No | Auto-copy to clipboard | `true` |
162
+ | `enableTimesheetIntegration` | No | Enable timesheet features | `true` |
163
+ | `timesheetDateFormat` | No | Date format for timesheets | "YYYY-MM-DD" |
164
+
165
+ ## Output Formats
166
+
167
+ ### Text Format (Default)
168
+ Human-readable format suitable for Slack/Teams messages:
169
+ ```
170
+ Hi everyone,
171
+ Yesterday (22/10)
172
+ - PROJ-123: Implemented user authentication
173
+ - PROJ-124: Fixed login bug
174
+
175
+ Today
176
+ - PROJ-125: Add password reset feature
177
+
178
+ No blockers
179
+
180
+ -------------------------------------------------------------
181
+ To Do List
182
+ 🟥 - PROJ-126: Fix critical bug
183
+ 🟩 - PROJ-127: New feature request
184
+ ```
185
+
186
+ ### JSON Format
187
+ Structured data for integrations:
188
+ ```json
189
+ {
190
+ "greeting": "Hi everyone",
191
+ "yesterday": [
192
+ "PROJ-123: Implemented user authentication",
193
+ "PROJ-124: Fixed login bug"
194
+ ],
195
+ "today": [
196
+ "PROJ-125: Add password reset feature"
197
+ ],
198
+ "blockers": "No blockers",
199
+ "todoList": [
200
+ "🟥 - PROJ-126: Fix critical bug",
201
+ "🟩 - PROJ-127: New feature request"
202
+ ],
203
+ "worklog": "..."
204
+ }
205
+ ```
206
+
207
+ ### Markdown Format
208
+ Same as text but optimized for markdown rendering
209
+
210
+ ## Advanced Usage
211
+
212
+ ### Multiple Environments
213
+ Maintain different configs for different projects:
214
+
215
+ ```bash
216
+ # Project A
217
+ cd ~/projects/project-a
218
+ jira-report config init
219
+ jira-report generate
220
+
221
+ # Project B
222
+ cd ~/projects/project-b
223
+ jira-report config init
224
+ jira-report generate
225
+ ```
226
+
227
+ ### CI/CD Integration
228
+ ```bash
229
+ # In your CI script
230
+ export JIRA_SERVER="$JIRA_SERVER_SECRET"
231
+ export JIRA_USERNAME="$JIRA_USERNAME_SECRET"
232
+ export JIRA_API_TOKEN="$JIRA_API_TOKEN_SECRET"
233
+ export TEMPO_API_TOKEN="$TEMPO_API_TOKEN_SECRET"
234
+
235
+ jira-report generate -f json -o report.json --no-cache
236
+ ```
237
+
238
+ ### Scheduled Reports
239
+ Add to crontab for daily reports:
240
+ ```bash
241
+ # Generate report every weekday at 9 AM
242
+ 0 9 * * 1-5 jira-report generate -o ~/daily-reports/$(date +\%Y-\%m-\%d).txt
243
+ ```
244
+
245
+ ## Troubleshooting
246
+
247
+ ### "Configuration 'xxx' is required but not set"
248
+ - Ensure you've run `jira-report config init` and filled in all required fields
249
+ - Or set the corresponding environment variables
250
+
251
+ ### "Failed to copy to clipboard"
252
+ - Install optional dependency: `npm install -g clipboardy`
253
+ - Or use `-o` flag to save to file instead
254
+
255
+ ### API Token Issues
256
+ - Verify tokens are correct and haven't expired
257
+ - Jira API Token: https://id.atlassian.com/manage-profile/security/api-tokens
258
+ - Tempo API Token: https://apidocs.tempo.io/#section/Authentication
259
+
260
+ ### Network/Firewall Issues
261
+ - Ensure you can access your Jira instance from the command line
262
+ - Check proxy settings if behind corporate firewall
263
+
264
+ ## Differences from VS Code Extension
265
+
266
+ | Feature | VS Code Extension | CLI |
267
+ |---------|-------------------|-----|
268
+ | Configuration | VS Code settings | Config file or env vars |
269
+ | Output | Output panel + clipboard | Console, file, or clipboard |
270
+ | Interactive prompts | Yes | No (command-line only) |
271
+ | Quick actions | Yes | Not yet implemented |
272
+ | Timesheet parsing | Yes | Not yet implemented |
273
+
274
+ ## Getting API Tokens
275
+
276
+ ### Jira API Token
277
+ 1. Go to https://id.atlassian.com/manage-profile/security/api-tokens
278
+ 2. Click "Create API token"
279
+ 3. Give it a descriptive name (e.g., "Daily Report CLI")
280
+ 4. Copy the token immediately (you can't see it again)
281
+
282
+ ### Tempo API Token
283
+ 1. Log in to your Jira instance
284
+ 2. Go to Tempo > Settings > Data Access > API Integration
285
+ 3. Create a new token
286
+ 4. Copy and save the token
287
+
288
+ ## Support
289
+
290
+ For issues, feature requests, or contributions:
291
+ - GitHub: https://github.com/voxuanthuan/daily-report
292
+ - Issues: https://github.com/voxuanthuan/daily-report/issues
293
+
294
+ ## License
295
+
296
+ See LICENSE file in the repository.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Thuanvo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,180 @@
1
+ # Jira Daily Report Extension
2
+
3
+ A VS Code extension that generates daily standup reports from your Jira Server and integrates with Tempo time tracking.
4
+
5
+ **🌐 Website**: [https://v0-jira-daily-report.vercel.app/](https://v0-jira-daily-report.vercel.app/)
6
+
7
+ ## Requirements
8
+
9
+ - VS Code 1.80.0 or later
10
+ - Jira Server access with API token
11
+ - Tempo time tracking (optional)
12
+
13
+ ## Installation
14
+
15
+ ### Method 1: From VS Code Marketplace
16
+ 1. Open VS Code
17
+ 2. Go to Extensions (`Ctrl+Shift+X`)
18
+ 3. Search for "jira-daily-report"
19
+ 4. Click Install
20
+
21
+ ### Method 2: Quick Install
22
+ 1. Open VS Code
23
+ 2. Press `Ctrl+P` (Quick Open)
24
+ 3. Type: `ext install thuanvo.jira-daily-report`
25
+ 4. Press Enter
26
+
27
+ ### Method 3: Manual Installation
28
+ 1. Download from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=thuanvo.jira-daily-report)
29
+ 2. Install the .vsix file in VS Code
30
+
31
+ ## Configuration
32
+
33
+ Before using the extension, configure your Jira settings:
34
+
35
+ 1. Open VS Code Settings (`Ctrl+,`)
36
+ 2. Search for "jira daily report"
37
+ 3. Configure the following:
38
+ - **Jira Server URL**: Your Jira instance (e.g., `https://yourcompany.atlassian.net/`)
39
+ - **Username**: Your Jira username (email)
40
+ - **API Token**: [Get your Jira API token](https://confluence.atlassian.com/cloud/api-tokens-938839638.html)
41
+ - **Tempo API Token**: [Get your Tempo API token](https://apidocs.tempo.io/#section/Authentication) (optional)
42
+ - **Who Am I**: Select "Developer" or "QC"
43
+ - **Auto Clipboard**: Enable to automatically copy reports to clipboard
44
+
45
+ ## Features
46
+
47
+ ### 1. Generate Jira Daily Report
48
+
49
+ Creates a daily standup report with your tasks, time tracking, and blockers.
50
+
51
+ **How to use:**
52
+ 1. Press `Ctrl+Shift+P` to open Command Palette
53
+ 2. Type: `Generate Jira Daily Report`
54
+ 3. Press Enter
55
+
56
+ **Or use keyboard shortcut:** `Ctrl+Shift+R` (Windows/Linux) or `Cmd+Shift+R` (Mac)
57
+
58
+ **What it does:**
59
+ - Fetches your current Jira tasks (Open, In Progress, Selected for Development)
60
+ - Retrieves time tracking data from Tempo
61
+ - Generates formatted report with:
62
+ - Yesterday's completed work
63
+ - Today's planned tasks
64
+ - Blockers and impediments
65
+ - Time tracking summary
66
+
67
+ ### 2. Open Ticket
68
+
69
+ Opens any Jira ticket in your browser quickly.
70
+
71
+ **How to use:**
72
+ 1. Press `Ctrl+Shift+P` to open Command Palette
73
+ 2. Type: `Open Ticket`
74
+ 3. Press Enter
75
+ 4. Enter ticket key (e.g., `B2B-1079`)
76
+ 5. Ticket opens in your default browser
77
+
78
+ **Or use keyboard shortcut:** `Ctrl+Shift+O` (Windows/Linux) or `Cmd+Shift+O` (Mac)
79
+
80
+ **What it does:**
81
+ - Prompts for ticket key
82
+ - Opens the ticket in your default browser
83
+ - Quick way to view ticket details, comments, attachments
84
+
85
+ ### 3. Jira Quick Action
86
+
87
+ Main feature that combines time logging and status changes in one command using hashtag syntax.
88
+
89
+ **How to use:**
90
+ 1. Press `Ctrl+Shift+P` to open Command Palette
91
+ 2. Type: `Jira Quick Action`
92
+ 3. Press Enter
93
+ 4. Enter command with hashtag syntax (see examples below)
94
+
95
+ **Or use keyboard shortcut:** `Ctrl+Shift+J` (Windows/Linux) or `Cmd+Shift+J` (Mac)
96
+
97
+ **Hashtag Syntax Examples:**
98
+ ```
99
+ # Log time and change status
100
+ B2B-1079 #time 2h #under-review
101
+
102
+ # Change status only
103
+ B2B-1079 #under-review
104
+
105
+ # Log time only
106
+ B2B-1079 #time 2h
107
+
108
+ # Order doesn't matter
109
+ #time 2h B2B-1079 #in-progress
110
+
111
+ # Use aliases
112
+ B2B-1079 #time 1.5h #dev # dev = selected for development
113
+ B2B-1079 #review # review = under-review
114
+ ```
115
+
116
+ **Supported Time Formats:**
117
+ - `2h` (2 hours)
118
+ - `1.5h` (1.5 hours)
119
+ - `30m` (30 minutes)
120
+ - `1h 30m` (1 hour 30 minutes)
121
+
122
+ **Supported Status Changes:**
123
+ - `#open` → Open
124
+ - `#selected` or `#dev` → Selected for Development
125
+ - `#in-progress` or `#wip` → In Progress
126
+ - `#under-review` or `#review` → Under Review
127
+ - `#ready-for-testing` or `#testing` → Ready for Testing
128
+
129
+ **What it does:**
130
+ 1. Validates ticket format and syntax
131
+ 2. Logs time directly to Tempo (if `#time` specified)
132
+ 3. Changes ticket status via Jira API (if status specified)
133
+ 4. Shows detailed results with success/failure information
134
+
135
+ ### 4. My Jira Tickets
136
+
137
+ Browse your current tickets and perform quick actions.
138
+
139
+ **How to use:**
140
+ 1. Press `Ctrl+Shift+P` to open Command Palette
141
+ 2. Type: `My Jira Tickets`
142
+ 3. Press Enter
143
+ 4. Select a ticket from the list
144
+ 5. Choose an action for the selected ticket
145
+
146
+ **Or use keyboard shortcut:** `Ctrl+Shift+T` (Windows/Linux) or `Cmd+Shift+T` (Mac)
147
+
148
+ **What it shows:**
149
+ - **In Progress tickets** (marked with 🔥 for high priority)
150
+ - **Selected for Development tickets**
151
+ - Quick actions for each ticket (log time, change status, etc.)
152
+
153
+ **What it does:**
154
+ - Displays your current work in a organized list
155
+ - Provides quick access to ticket actions
156
+ - Integrates with Jira Quick Action for seamless workflow
157
+
158
+ ## Keyboard Shortcuts Summary
159
+
160
+ - **`Ctrl+Shift+R`** - Generate Jira Daily Report
161
+ - **`Ctrl+Shift+O`** - Open Ticket in Browser
162
+ - **`Ctrl+Shift+J`** - Jira Quick Action
163
+ - **`Ctrl+Shift+T`** - My Jira Tickets
164
+
165
+ *On Mac, use `Cmd` instead of `Ctrl`*
166
+
167
+ ## Additional Resources
168
+
169
+ - **Website**: [https://v0-jira-daily-report.vercel.app/](https://v0-jira-daily-report.vercel.app/)
170
+ - **GitHub Repository**: [https://github.com/voxuanthuan/daily-report](https://github.com/voxuanthuan/daily-report)
171
+ - **Issues & Feature Requests**: [GitHub Issues](https://github.com/voxuanthuan/daily-report/issues)
172
+ - **Keyboard Shortcuts Reference**: [KEYBOARD_SHORTCUTS.md](KEYBOARD_SHORTCUTS.md)
173
+
174
+ ## Support
175
+
176
+ For help with setup, troubleshooting, or feature requests, please visit our [GitHub Issues](https://github.com/voxuanthuan/daily-report/issues) page.
177
+
178
+ ## License
179
+
180
+ [MIT](./License.md)