{{-- Monthly cards — one card per month of the quarter, each showing THAT MONTH ONLY. The headline percentage is the month's throughput: the stories moved to Completed (BA UAT / PO UAT / Done) during the month ÷ the stories that moved into In QA during it. Both halves are Jira transitions inside the month, so a closed month never changes again; the current month is the only one still moving, and months that haven't started render blank. Above 100% is real and expected — it means the month cleared stories that entered QA earlier. Those figures cover the quarter's CONFIRMED TARGETS only, so the percentage reads against the commitment. `outside_completed` reports the month's QA sign-offs on stories that were never committed as targets — beside the percentage, never inside it. Params: $months (rows from QaLoadService::monthlyCohort or the roll-up), $stages (key => ['cls','color']), $stageLabels (key => label). --}} @php // The bar spans everything the month touched: the completions, plus the stories that // entered QA and were still there at month end. $touched = fn ($m) => array_sum($m['buckets']); @endphp
@foreach ($months as $m) @php $noTargets = ! $m['in_qa'] && ! $m['signed_off']; // "Blank" only when nothing at all happened — non-target sign-offs still count as QA // having worked, so a month with those is not an empty month. $blank = ! empty($m['future']) || ($noTargets && empty($m['outside_completed'])); @endphp
{{ $m['label'] }} @if (empty($m['future']) && empty($m['closed'])) in progress @endif @if ($m['stale'])stale@endif
@if (! empty($m['future'])) {{-- Nothing has happened in it yet, and nothing is carried into it. --}}
not started yet
@elseif ($blank)
no QA movement this month
@elseif ($noTargets) {{-- QA worked, but on nothing that was committed as a target this quarter. --}}
no target movement this month
@else @if ($m['in_qa'])
{{ $m['percent'] }}%
@else {{-- Completions but no intake: a percentage would have no denominator. --}}
{{ $m['signed_off'] }} done
@endif
{{ $m['signed_off'] }} moved to Completed @if ($m['in_qa']) · {{ $m['in_qa'] }} entered In QA @else · none entered In QA @endif
@php $notes = []; if ($m['buckets']['still_in_qa']) { $notes[] = $m['buckets']['still_in_qa'].' still in QA at month end'; } // Why the percentage can read above 100%. if ($m['signed_off'] > $m['in_qa']) { $notes[] = ($m['signed_off'] - $m['in_qa']).' completed here entered QA earlier'; } @endphp @if ($notes)
{{ implode(' · ', $notes) }}
@endif @if (! empty($m['targets_in_scope'])) {{-- The month's own completions read against the commitment that existed by then. --}}
{{ $m['percent_of_targets'] }}% of the {{ $m['targets_in_scope'] }} targets in scope · this month
@if (! empty($m['new_targets']))
✚ {{ $m['new_targets'] }} new target{{ $m['new_targets'] === 1 ? '' : 's' }} created this month
@endif @endif
@foreach ($stages as $key => $s) @if ($m['buckets'][$key] > 0) @endif @endforeach
@foreach ($stages as $key => $s) @if ($m['buckets'][$key] > 0) {{ $stageLabels[$key] }} {{ $m['buckets'][$key] }} @endif @endforeach
@endif @if (! empty($m['outside_completed'])) {{-- QA sign-offs on stories that were never committed as targets. Counted apart from the percentage above, which is deliberately "of the commitment". --}}
{{ $m['outside_completed'] }} completed outside the target list
@endif @if (empty($m['future']))
{{ $m['bugs_filed'] }} bug{{ $m['bugs_filed'] === 1 ? '' : 's' }} filed @if ($m['bugs_filed']) · {{ $m['bugs_closed'] }} closed @endif
@if (! empty($m['subtasks_created']))
{{ $m['subtasks_created'] }} sub-task{{ $m['subtasks_created'] === 1 ? '' : 's' }} raised · {{ $m['subtasks_done'] }} done
@endif @endif
@endforeach