Skip to content

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

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

HYPERFLEET-800 - feat: update team-weekly-update commands due to Jira generation and add Epic complete ratio in report output#15
yufchang wants to merge 4 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
    • Parent epic identification improved and per-issue view now shows parent epic info and issue type (explicitly marks when no parent)
    • Issue listings and time-range filters refined to better surface completed work and include items missing activity type
    • Epic processing now lists child issues and shows a Done/Total completion ratio and percentage
    • Output format standardized into a three-level nested structure with an explicit team/date header and type-prefixed "No Parent" entries

@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

Updated Jira queries and parsing to use the native parent link (fields.parent) and to filter issues by resolution = Done and customfield_10464 (including IS EMPTY). Issue payloads now include parent epic key/summary/status, the issue’s own issuetype, and an explicit marker when fields.parent is null. For each epic the changes list child issues to compute a complete_ratio (done children / total children) and epic lines now show [Closed]/[Total] plus percentage. Output is reorganized into a three-level nested structure: Activity type -> Epic -> Story/Task/Bug; issues without a parent epic are shown under a “No Parent Epic” group with each summary prefixed by its type.

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] (%)
Loading

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.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly describes the main changes: updating team-weekly-update commands and adding Epic complete ratio to report output, and includes the JIRA ticket ID (HYPERFLEET-800).

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

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

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

61-61: ⚠️ Potential issue | 🔴 Critical

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

📥 Commits

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

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

@rafabene
Copy link
Contributor

Category: Pattern

The PR title doesn't reference a JIRA ticket. Could you add the ticket ID
(e.g., HYPERFLEET-XXX: feat: ...) so it's easy to trace back to the
requirement?

@yufchang yufchang changed the title feat: update team-weekly-update commands due to Jira generation and add Epic complete ratio in report output HYPERFLEET-800 - feat: update team-weekly-update commands due to Jira generation and add Epic complete ratio in report output Mar 24, 2026
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 (2)
hyperfleet-jira/commands/team-weekly-update.md (2)

70-70: ⚠️ Potential issue | 🔴 Critical

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

Critical: 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 the jira command, 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

📥 Commits

Reviewing files that changed from the base of the PR and between e1573de and a27366b.

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

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