@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