ticketlens 0.19.0 → 0.20.1
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/package.json
CHANGED
package/skills/jtb/SKILL.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- jtb-skill-version: 0.
|
|
1
|
+
<!-- jtb-skill-version: 0.20.1 -->
|
|
2
2
|
---
|
|
3
3
|
name: jtb
|
|
4
4
|
description: Fetch a Jira ticket's full context (description, comments, linked issues, code references) and assemble a structured TicketBrief for implementation planning. Use when user types /jtb, mentions a Jira ticket key, or wants to plan work from a Jira ticket.
|
|
@@ -345,6 +345,10 @@ When `--push` is run by a Pro-licensed user, the local compliance ledger (writte
|
|
|
345
345
|
|
|
346
346
|
Non-Pro users push with `compliance_status: unknown` — no data is lost, and the analytics page simply shows no compliance data for those snapshots.
|
|
347
347
|
|
|
348
|
+
### triage --push priority/label fields (Team)
|
|
349
|
+
|
|
350
|
+
`--push` now includes each ticket's `priority` and `labels` in the payload (previously omitted). This feeds two Console features under `/console/admin/rules`: real-value suggestions for the Priority/Label fields when building custom attention rules (previously only Status/Key prefix had them), and the `notify`/`schedule` custom-rule actions, which match on priority/label server-side. No new flag — this is automatic on every `--push`.
|
|
351
|
+
|
|
348
352
|
### --plain / --styled
|
|
349
353
|
|
|
350
354
|
Control output formatting:
|
|
@@ -75,6 +75,23 @@ export function findLastEffectiveComment(comments, currentUser) {
|
|
|
75
75
|
return { comment: null, fromCurrentUser: false };
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Test whether a ticket satisfies a rule's match conditions.
|
|
80
|
+
* Ported 1:1 to PHP as CustomRuleMatcher::matches() — keep both in sync,
|
|
81
|
+
* parity enforced by fixtures/custom-rule-match-cases.json.
|
|
82
|
+
*/
|
|
83
|
+
export function matchesRuleConditions(ticket, match) {
|
|
84
|
+
const { priority, label, status, keyPrefix } = match;
|
|
85
|
+
if (priority !== undefined && ticket.priority !== priority) return false;
|
|
86
|
+
if (status !== undefined && ticket.status !== status) return false;
|
|
87
|
+
if (label !== undefined) {
|
|
88
|
+
const labels = Array.isArray(ticket.labels) ? ticket.labels : [];
|
|
89
|
+
if (!labels.includes(label)) return false;
|
|
90
|
+
}
|
|
91
|
+
if (keyPrefix !== undefined && !String(ticket.key).startsWith(keyPrefix)) return false;
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
|
|
78
95
|
/**
|
|
79
96
|
* Apply a single custom rule against a ticket.
|
|
80
97
|
* Returns 'force-urgent' | 'ignore' | null.
|
|
@@ -83,17 +100,7 @@ export function findLastEffectiveComment(comments, currentUser) {
|
|
|
83
100
|
function applyCustomRule(ticket, rule) {
|
|
84
101
|
if (!rule || typeof rule.match !== 'object' || !rule.match) return null;
|
|
85
102
|
if (rule.action !== 'force-urgent' && rule.action !== 'ignore') return null;
|
|
86
|
-
|
|
87
|
-
const { priority, label, status, keyPrefix } = rule.match;
|
|
88
|
-
if (priority !== undefined && ticket.priority !== priority) return null;
|
|
89
|
-
if (status !== undefined && ticket.status !== status) return null;
|
|
90
|
-
if (label !== undefined) {
|
|
91
|
-
const labels = Array.isArray(ticket.labels) ? ticket.labels : [];
|
|
92
|
-
if (!labels.includes(label)) return null;
|
|
93
|
-
}
|
|
94
|
-
if (keyPrefix !== undefined && !String(ticket.key).startsWith(keyPrefix)) return null;
|
|
95
|
-
|
|
96
|
-
return rule.action;
|
|
103
|
+
return matchesRuleConditions(ticket, rule.match) ? rule.action : null;
|
|
97
104
|
}
|
|
98
105
|
|
|
99
106
|
export function scoreAttention(ticket, currentUser, opts = {}) {
|
|
@@ -9,6 +9,8 @@ export function buildTicketPayload(scored, rawMap, baseUrl) {
|
|
|
9
9
|
summary: scored.summary ?? null,
|
|
10
10
|
status: scored.status ?? null,
|
|
11
11
|
assignee: raw?.assignee ?? null,
|
|
12
|
+
priority: raw?.priority ?? null,
|
|
13
|
+
labels: Array.isArray(raw?.labels) ? raw.labels : [],
|
|
12
14
|
attention_score: null,
|
|
13
15
|
flags: scored.urgency === 'clear' ? [] : [scored.urgency],
|
|
14
16
|
// last_comment_at feeds server-side response-time metrics (F19c).
|