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 |
WalkthroughReplaces the custom epic link field ( 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)
📝 Coding Plan
Comment Tip You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.Change the |
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
| ``` | ||
|
|
||
| 2. Calucate the Epic complete_ratio: | ||
| complete_ratio = the number of Done childeren issues / total number of children issue * 100 |
There was a problem hiding this comment.
Problem:
The PR adds a complete_ratio calculation formula (Done children / total children * 100) but
provides no command or instructions for how to actually query the number of children an epic
has. The "For Each Unique Epic Key" section fetches epic details (key, summary, status, type)
but never fetches the epic's children. An implementer following these instructions would have
no way to compute the ratio.
The complete_ratio formula is defined here but there's no command to actually query the
epic's children. The epic details command only fetches the epic's own metadata — you'd need
something like:
# Get all children of the epic and their resolution status
jira issue list -q '"parent" = <EPIC_KEY>' --columns KEY,STATUS --plain --no-headers
2>/dev/nullThen count how many have resolution = Done vs total to compute the ratio. Without this step,
the ratio can't be calculated.
| # For each activity type, fetch closed issues: | ||
| for activity_type in "${ACTIVITY_TYPES[@]}"; do | ||
| jira issue list -q 'project = ${1:-HYPERFLEET} and type in (Story,Task,Bug) and status changed to "closed" during (-7d,now()) and cf[12320040] = "'"$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 |
There was a problem hiding this comment.
Category: Inconsistency
The JQL here mixes and (lowercase) with AND (uppercase) in the same query:
...and type in (Story,Task,Bug) and resolution = Done AND status changed to closed...
Pick one casing and stick with it — either all lowercase and or all uppercase AND. Same
applies to line 70.
- 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