Skip to content

feat: update team-weekly-update commands due to Jira generation and add Epic complete ratio in report output#15

Open
yufchang wants to merge 2 commits intoopenshift-hyperfleet:mainfrom
yufchang:main
Open

feat: update team-weekly-update commands due to Jira generation and add Epic complete ratio in report output#15
yufchang wants to merge 2 commits intoopenshift-hyperfleet:mainfrom
yufchang:main

Conversation

@yufchang
Copy link
Contributor

@yufchang yufchang commented Mar 18, 2026

  1. Fixed Epic Field: Changed customized field
  2. Added Epic Completion Ratio: Each epic now shows:
    - Status (Closed, In Progress, etc.)
    - Completion ratio (done/total - percentage)
  3. Maintained Display Structure:
    Activity Type
    └── Epic (Status + Completion)
    ├── Story/Task/Bug
    ├── Story/Task/Bug
    └── ...
    └── No Parent Epic
    ├── Story/Task/Bug
    └── ...

Summary by CodeRabbit

  • Documentation
    • Workflow now groups closed issues under their parent epic and shows epic status with a Done/Total count and a new epic-level completion ratio
    • Output hierarchy changed to: Activity type → Epic → Story/Task/Bug for clearer context
    • Issues without a parent epic now include type prefixes (e.g., [Bug], [Story])
    • Minor wording clarified in the top-level description

@openshift-ci
Copy link

openshift-ci bot commented Mar 18, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ciaranroche for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

Walkthrough

Replaces the custom epic link field (cf[12320040]) with the native parent epic relationship (fields.parent) and updates listing queries to use resolution = Done and customfield_10464. Issue detail extraction now reads fields.parent and captures each issue’s type. Output grouping is restructured to Activity type -> Epic -> Story/Task/Bug. Adds an epic-level complete_ratio (Done children / total children) and shows epic status plus Done/Total and complete_ratio on epic lines. The "No Parent Epic" section now prefixes issues with their type; the phrase "in one team" was removed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly summarizes the main changes: updating the team-weekly-update command due to Jira field changes and adding Epic completion ratio to report output, which align with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.

Change the reviews.profile setting to assertive to make CodeRabbit's nitpick more issues in your PRs.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between b8e331c and 632e3b4.

📒 Files selected for processing (1)
  • hyperfleet-jira/commands/team-weekly-update.md

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (4)
hyperfleet-jira/commands/team-weekly-update.md (4)

121-121: ⚠️ Potential issue | 🟠 Major

Major: 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 | 🔴 Critical

Critical: 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/null

Also 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 | 🟠 Major

Major: 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 | 🟠 Major

Major: 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

📥 Commits

Reviewing files that changed from the base of the PR and between 632e3b4 and b0bbaf2.

📒 Files selected for processing (1)
  • hyperfleet-jira/commands/team-weekly-update.md

Copy link
Contributor Author

@yufchang yufchang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review done

```

2. Calucate the Epic complete_ratio:
complete_ratio = the number of Done childeren issues / total number of children issue * 100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/null

Then 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants