Skip to content

pr: [Nightly Fix] - Bug - Correct All Status Reports#46

Open
jewel-claw wants to merge 1 commit intomasterfrom
nightly-fix/fix-all-status-report-totals
Open

pr: [Nightly Fix] - Bug - Correct All Status Reports#46
jewel-claw wants to merge 1 commit intomasterfrom
nightly-fix/fix-all-status-report-totals

Conversation

@jewel-claw
Copy link
Copy Markdown

What

Fix form report totals and counts so the "All" bucket actually includes all submissions instead of falling into the abandoned-payment filter path.

Why

Submission::getTotalCount() and Submission::paymentTotal() both treat a missing $paymentStatus as a filtered case. getFormReport() calls those methods without a status for the top-level summary, so the current "All" report can return incomplete numbers.

Fix

  • Only apply the abandoned-payment query branch when the status is explicitly abandoned
  • Only add a payment-status filter when a real status value is provided
  • Leave the existing abandoned and per-status report behavior unchanged

Confidence

High. This is a narrow logic correction in the report model layer, and the modified file passes php -l.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Mar 20, 2026

PR author is not in the allowed authors list.

@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot Bot commented Mar 20, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • includes/Classes/Models/Submission.php

The logic changes in both getTotalCount() and paymentTotal() methods correctly address the issue:

  • When $paymentStatus is explicitly 'abandoned', the abandoned query is applied
  • When $paymentStatus is any other truthy value, it's filtered by that status
  • When $paymentStatus is falsy (no filter), all records are returned - fixing the "All" bucket

Reviewed by minimax-m2.5-20260211 · 79,611 tokens

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.

1 participant