HYPERFLEET-800 - feat: update team-weekly-update commands due to Jira generation and add Epic complete ratio in report output#15
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
WalkthroughUpdated Jira queries and parsing to use the native parent link ( Sequence Diagram(s)sequenceDiagram
participant CLI as Script
participant Jira as Jira API
participant Out as Formatter/Output
CLI->>Jira: Query issues (filters: resolution=Done, customfield_10464, date range)
Jira-->>CLI: Return issue list (includes fields.parent and issuetype)
loop per issue with parent
CLI->>Jira: If fields.parent present -> Fetch parent epic details
Jira-->>CLI: Return epic key/summary/status
CLI->>Jira: List epic children
Jira-->>CLI: Return epic children (statuses)
CLI->>CLI: Compute complete_ratio (done/total)
end
CLI->>Out: Group by activity type -> Epic -> Issue (mark No Parent Epic with [TYPE])
Out-->>CLI: Render three-level report with headers (team/date) and epic [Closed]/[Total] (%)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@hyperfleet-jira/commands/team-weekly-update.md`:
- Around line 88-90: Clarify and standardize the definition and rendering of
complete_ratio: define complete_ratio as "done_count/total_count (percentage%)"
where done_count = number of Done child issues and total_count = total number of
child issues, and update all placeholders and examples that currently show only
"%" to display both counts and the percentage (e.g., "3/7 (42.9%)"); also fix
the typos ("Calucate" → "Calculate", "childeren" → "children") and update every
occurrence of complete_ratio rendering in the document (including the other
noted spots) so examples, descriptions and output contracts consistently follow
the "X/Y (Z%)" format.
- Line 61: The jira command invocation uses single-quoted JQL so shell variables
(${1:-HYPERFLEET}, ${2:+and Team = $2}, and "$activity_type") are not expanded;
update the jira command string to use double quotes so parameter expansions
work, and properly escape any inner quotes around the activity_type value (e.g.,
convert 'project = ${1:-HYPERFLEET} and ... customfield_10464 =
'"'$activity_type'"'' to a double-quoted string with the inner literal quotes
escaped) so the ${1}, ${2}, and $activity_type substitutions are expanded before
calling the jira CLI.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: dae9659a-100f-4056-8d69-3f23de1c2baf
📒 Files selected for processing (1)
hyperfleet-jira/commands/team-weekly-update.md
There was a problem hiding this comment.
♻️ Duplicate comments (4)
hyperfleet-jira/commands/team-weekly-update.md (4)
121-121:⚠️ Potential issue | 🟠 MajorMajor: Fix example to show complete format (duplicate of previous review)
The example still shows only percentage, not the "done/total and percentage" format described in the PR objectives.
📝 Required example fix
- **Epic: HYPERFLEET-402 - E2E Test Automation Framework for CLM Components - MVP** (Status: Closed, 90%) + **Epic: HYPERFLEET-402 - E2E Test Automation Framework for CLM Components - MVP** (Status: Closed, 9/10 (90%))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@hyperfleet-jira/commands/team-weekly-update.md` at line 121, The example for the epic "Epic: HYPERFLEET-402 - E2E Test Automation Framework for CLM Components - MVP" currently only shows a percentage; update the example to use the full "done/total (percentage)" format described in the PR objectives—for example replace "90%" with a completed/total count and percent like "9/10 (90%)" in the Epic line so it matches the required format.
61-61:⚠️ Potential issue | 🔴 CriticalCritical: Shell variable expansion still broken (duplicate of previous review)
This critical issue from the previous review remains unaddressed. Single quotes prevent expansion of
${1:-HYPERFLEET},${2:+and Team = $2}, and$activity_type, causing the JQL query to fail or return incorrect results.🔧 Required fix: Switch to double quotes
- jira issue list -q 'project = ${1:-HYPERFLEET} and type in (Story,Task,Bug) and resolution = Done AND status changed to closed during (-7d, now()) and customfield_10464 = "'"$activity_type"'" ${2:+and Team = $2}' --columns KEY --plain --no-headers 2>/dev/null + jira issue list -q "project = ${1:-HYPERFLEET} and type in (Story,Task,Bug) and resolution = Done AND status changed to closed during (-7d, now()) and customfield_10464 = \"$activity_type\" ${2:+and Team = $2}" --columns KEY --plain --no-headers 2>/dev/nullAlso applies to: 70-70
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@hyperfleet-jira/commands/team-weekly-update.md` at line 61, The JQL string is wrapped in single quotes so shell variables (${1:-HYPERFLEET}, ${2:+and Team = $2}, and $activity_type) are not expanded; update the jira command invocation in the line containing "jira issue list -q 'project = ${1:-HYPERFLEET} ...'" to use double quotes for the -q argument so those variables expand, and ensure the inner quotes around $activity_type are properly escaped or converted (e.g., use \"${activity_type}\" or remove extra quotes) so the resulting JQL is valid.
88-89:⚠️ Potential issue | 🟠 MajorMajor: Clarify complete_ratio definition and fix typos (duplicate of previous review)
This issue from the previous review remains partially unaddressed. The definition is still ambiguous and doesn't match the PR objective to show "done/total and percentage."
📝 Required clarification and fixes
-2. Calucate the Epic complete_ratio: -complete_ratio = the number of Done childeren issues / total number of children issue * 100 +2. Calculate the Epic complete_ratio: +complete_ratio = done_children/total_children (percentage) +Example display format: 9/10 (90%)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@hyperfleet-jira/commands/team-weekly-update.md` around lines 88 - 89, Fix the typos and clarify the complete_ratio definition: rename "Calucate" to "Calculate" and "childeren" to "children", then define complete_ratio explicitly as two outputs for an Epic — a fraction and a percentage — e.g. complete_ratio_count = number of Done children issues and complete_ratio_total = total number of children issues, and percentage = (complete_ratio_count / complete_ratio_total) * 100; update the wording so the document states it will display "done/total and percentage" for each Epic and show the exact formula using complete_ratio_count, complete_ratio_total and percentage.
104-104:⚠️ Potential issue | 🟠 MajorMajor: Standardize complete_ratio display format (duplicate of previous review)
The output format placeholders remain inconsistent with the PR objective and the example at line 121.
📝 Required format standardization
- **Epic: [EPIC-KEY] - [Epic Summary]** (Status: [Epic Status], Done/Total, complete_ratio) + **Epic: [EPIC-KEY] - [Epic Summary]** (Status: [Epic Status], [DONE]/[TOTAL] ([PERCENT]%))- **Epic: [EPIC-KEY2] - [Epic Summary]** (Status: [Epic Status],Done/Total, complete_ratio) + **Epic: [EPIC-KEY2] - [Epic Summary]** (Status: [Epic Status], [DONE]/[TOTAL] ([PERCENT]%))Also applies to: 108-108
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@hyperfleet-jira/commands/team-weekly-update.md` at line 104, The template's complete_ratio placeholder is inconsistent: update every instance of the pattern "(Status: [Epic Status], Done/Total, complete_ratio)" (and the similar occurrence near the Epic header) to use the standardized display used elsewhere (the example format shown at the Epic example) — replace the literal token complete_ratio with the standardized placeholder/format (e.g., "[complete_ratio]% or {complete_ratio:0%}" per the project convention) so all epic lines like "**Epic: [EPIC-KEY] - [Epic Summary]** (Status: [Epic Status], Done/Total, complete_ratio)" and the analogous entry at the other occurrence use the exact same presentation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@hyperfleet-jira/commands/team-weekly-update.md`:
- Line 121: The example for the epic "Epic: HYPERFLEET-402 - E2E Test Automation
Framework for CLM Components - MVP" currently only shows a percentage; update
the example to use the full "done/total (percentage)" format described in the PR
objectives—for example replace "90%" with a completed/total count and percent
like "9/10 (90%)" in the Epic line so it matches the required format.
- Line 61: The JQL string is wrapped in single quotes so shell variables
(${1:-HYPERFLEET}, ${2:+and Team = $2}, and $activity_type) are not expanded;
update the jira command invocation in the line containing "jira issue list -q
'project = ${1:-HYPERFLEET} ...'" to use double quotes for the -q argument so
those variables expand, and ensure the inner quotes around $activity_type are
properly escaped or converted (e.g., use \"${activity_type}\" or remove extra
quotes) so the resulting JQL is valid.
- Around line 88-89: Fix the typos and clarify the complete_ratio definition:
rename "Calucate" to "Calculate" and "childeren" to "children", then define
complete_ratio explicitly as two outputs for an Epic — a fraction and a
percentage — e.g. complete_ratio_count = number of Done children issues and
complete_ratio_total = total number of children issues, and percentage =
(complete_ratio_count / complete_ratio_total) * 100; update the wording so the
document states it will display "done/total and percentage" for each Epic and
show the exact formula using complete_ratio_count, complete_ratio_total and
percentage.
- Line 104: The template's complete_ratio placeholder is inconsistent: update
every instance of the pattern "(Status: [Epic Status], Done/Total,
complete_ratio)" (and the similar occurrence near the Epic header) to use the
standardized display used elsewhere (the example format shown at the Epic
example) — replace the literal token complete_ratio with the standardized
placeholder/format (e.g., "[complete_ratio]% or {complete_ratio:0%}" per the
project convention) so all epic lines like "**Epic: [EPIC-KEY] - [Epic
Summary]** (Status: [Epic Status], Done/Total, complete_ratio)" and the
analogous entry at the other occurrence use the exact same presentation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b616a3ac-7157-4917-926e-b3f8ca222bd4
📒 Files selected for processing (1)
hyperfleet-jira/commands/team-weekly-update.md
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
hyperfleet-jira/commands/team-weekly-update.md (1)
61-61:⚠️ Potential issue | 🔴 CriticalParameter expansion is broken by single-quoted JQL (project/team filters won’t apply).
Line 61 and Line 70 wrap JQL in single quotes, so
${1:-HYPERFLEET}and${2:+and Team = $2}are passed literally instead of expanded.Suggested fix
-for activity_type in "${ACTIVITY_TYPES[@]}"; do - jira issue list -q 'project = ${1:-HYPERFLEET} and type in (Story,Task,Bug) and resolution = Done and status changed to closed during (-7d, now()) and customfield_10464 = "'"$activity_type"'" ${2:+and Team = $2}' --columns KEY --plain --no-headers 2>/dev/null +for activity_type in "${ACTIVITY_TYPES[@]}"; do + jira issue list -q "project = ${1:-HYPERFLEET} and type in (Story,Task,Bug) and resolution = Done and status changed to closed during (-7d, now()) and customfield_10464 = \"${activity_type}\" ${2:+and Team = \"$2\"}" --columns KEY --plain --no-headers 2>/dev/null @@ -jira issue list -q 'project = ${1:-HYPERFLEET} and type in (Story,Task,Bug) and resolution = Done and status changed to closed during (-7d, now()) and customfield_10464 is EMPTY ${2:+and Team = $2}' --columns KEY --plain --no-headers 2>/dev/null +jira issue list -q "project = ${1:-HYPERFLEET} and type in (Story,Task,Bug) and resolution = Done and status changed to closed during (-7d, now()) and customfield_10464 is EMPTY ${2:+and Team = \"$2\"}" --columns KEY --plain --no-headers 2>/dev/nullAlso applies to: 70-70
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@hyperfleet-jira/commands/team-weekly-update.md` at line 61, The JQL is wrapped in single quotes so shell variables like ${1:-HYPERFLEET}, ${2:+and Team = $2}, and $activity_type are not expanded; update the jira command lines (the jira issue list ... --columns KEY ... invocation) on both occurrences to wrap the JQL in double quotes instead of single quotes (and adjust/escape any inner quotes around $activity_type accordingly) so parameter expansion occurs at runtime.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@hyperfleet-jira/commands/team-weekly-update.md`:
- Line 89: The docs and calculation disagree about whether "complete" is
determined by Resolution or Status; pick one consistent criterion (e.g., use
.fields.status.name and treat a specific terminal workflow state like "Done" as
complete, or use .fields.resolution and treat non-null resolution as complete),
then update the description text ("resolution status" -> "status" or
"resolution" as chosen) and change the extraction and complete_ratio calculation
to use the same field (replace uses of .fields.status.name or resolution checks
so both extraction and the closed/complete children count reference the chosen
field), and ensure the variable/label complete_ratio and any wording about
"closed children issues" reflect that same criterion.
---
Duplicate comments:
In `@hyperfleet-jira/commands/team-weekly-update.md`:
- Line 61: The JQL is wrapped in single quotes so shell variables like
${1:-HYPERFLEET}, ${2:+and Team = $2}, and $activity_type are not expanded;
update the jira command lines (the jira issue list ... --columns KEY ...
invocation) on both occurrences to wrap the JQL in double quotes instead of
single quotes (and adjust/escape any inner quotes around $activity_type
accordingly) so parameter expansion occurs at runtime.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 01f3d232-21c1-478e-a1c5-78594cda8dd3
📒 Files selected for processing (1)
hyperfleet-jira/commands/team-weekly-update.md
|
Category: Pattern The PR title doesn't reference a JIRA ticket. Could you add the ticket ID |
There was a problem hiding this comment.
♻️ Duplicate comments (2)
hyperfleet-jira/commands/team-weekly-update.md (2)
70-70:⚠️ Potential issue | 🔴 CriticalCritical: Shell variables won't expand inside single-quoted JQL query.
Same issue as line 61 — the single quotes prevent
${1:-HYPERFLEET}and${2:+and Team = $2}from expanding.🔧 Proposed fix
-jira issue list -q 'project = ${1:-HYPERFLEET} and type in (Story,Task,Bug) and resolution = Done and status changed to closed during (-7d, now()) and customfield_10464 is EMPTY ${2:+and Team = $2}' --columns KEY --plain --no-headers 2>/dev/null +jira issue list -q "project = ${1:-HYPERFLEET} and type in (Story,Task,Bug) and resolution = Done and status changed to closed during (-7d, now()) and customfield_10464 is EMPTY ${2:+and Team = $2}" --columns KEY --plain --no-headers 2>/dev/null🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@hyperfleet-jira/commands/team-weekly-update.md` at line 70, The JQL query is wrapped in single quotes so shell variables (${1:-HYPERFLEET} and ${2:+and Team = $2}) will not expand; change the command to use double quotes for the JQL string (e.g., jira issue list -q "project = ${1:-HYPERFLEET} and type in (Story,Task,Bug) and resolution = Done and status changed to closed during (-7d, now()) and customfield_10464 is EMPTY ${2:+and Team = $2}" --columns KEY --plain --no-headers 2>/dev/null) so the variables expand, ensuring you properly escape any embedded double quotes if you add them later.
61-61:⚠️ Potential issue | 🔴 CriticalCritical: Shell variables won't expand inside single-quoted JQL query.
Line 61 wraps the JQL query in single quotes, preventing
${1:-HYPERFLEET}and${2:+and Team = $2}from expanding. These will be passed literally to thejiracommand, breaking the parameterization logic. Only"'"$activity_type"'"expands because it explicitly breaks out of single quotes.🔧 Proposed fix
- jira issue list -q 'project = ${1:-HYPERFLEET} and type in (Story,Task,Bug) and resolution = Done and status changed to closed during (-7d, now()) and customfield_10464 = "'"$activity_type"'" ${2:+and Team = $2}' --columns KEY --plain --no-headers 2>/dev/null + jira issue list -q "project = ${1:-HYPERFLEET} and type in (Story,Task,Bug) and resolution = Done and status changed to closed during (-7d, now()) and customfield_10464 = \"$activity_type\" ${2:+and Team = $2}" --columns KEY --plain --no-headers 2>/dev/null🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@hyperfleet-jira/commands/team-weekly-update.md` at line 61, The JQL is single-quoted so shell vars (${1:-HYPERFLEET}, ${2:+and Team = $2}) never expand; change the jira invocation (the `jira issue list -q ...` command) to use double quotes around the entire JQL and keep the activity_type value single-quoted inside, e.g. -q "project = ${1:-HYPERFLEET} and type in (Story,Task,Bug) and resolution = Done and status changed to closed during (-7d, now()) and customfield_10464 = '${activity_type}' ${2:+and Team = $2}" so all parameters (`${1:-...}`, `${activity_type}`, `${2:+...}`) expand correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@hyperfleet-jira/commands/team-weekly-update.md`:
- Line 70: The JQL query is wrapped in single quotes so shell variables
(${1:-HYPERFLEET} and ${2:+and Team = $2}) will not expand; change the command
to use double quotes for the JQL string (e.g., jira issue list -q "project =
${1:-HYPERFLEET} and type in (Story,Task,Bug) and resolution = Done and status
changed to closed during (-7d, now()) and customfield_10464 is EMPTY ${2:+and
Team = $2}" --columns KEY --plain --no-headers 2>/dev/null) so the variables
expand, ensuring you properly escape any embedded double quotes if you add them
later.
- Line 61: The JQL is single-quoted so shell vars (${1:-HYPERFLEET}, ${2:+and
Team = $2}) never expand; change the jira invocation (the `jira issue list -q
...` command) to use double quotes around the entire JQL and keep the
activity_type value single-quoted inside, e.g. -q "project = ${1:-HYPERFLEET}
and type in (Story,Task,Bug) and resolution = Done and status changed to closed
during (-7d, now()) and customfield_10464 = '${activity_type}' ${2:+and Team =
$2}" so all parameters (`${1:-...}`, `${activity_type}`, `${2:+...}`) expand
correctly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d605bb4b-5186-4e18-9918-8741f041a3f3
📒 Files selected for processing (1)
hyperfleet-jira/commands/team-weekly-update.md
- Status (Closed, In Progress, etc.)
- Completion ratio (done/total - percentage)
Activity Type
└── Epic (Status + Completion)
├── Story/Task/Bug
├── Story/Task/Bug
└── ...
└── No Parent Epic
├── Story/Task/Bug
└── ...
Summary by CodeRabbit