DEV Community

Miran
Miran

Posted on

Debugging a Document Request That Turns Green Too Early

When uploaded, received, and request complete collapse into one Boolean, the interface can look successful while required review and reupload work is still unresolved.

A debugging trace beneath a May document request showing that a green Complete status is incorrect because one required payroll summary is pending staff review and one required sales report needs a client reupload
A document request can display a green checkmark while two required items still need work.

The bank statement was uploaded and reviewed.

The payroll summary was uploaded but is still waiting for staff review.

The sales report covers the wrong period and needs a replacement.

No upload failed. No API returned an error. Every file may exist in storage exactly where the application expected it.

The failure is the conclusion:

Request complete.

That kind of bug is easy to miss because the interface looks successful. The problem is not in the upload control. It is in the rule that decides what the green badge is allowed to mean.

Start with the smallest claim the system can prove

A successful upload proves something narrow:

A file arrived.

It does not prove that the file is the requested document, that it covers the correct period, or that someone has reviewed it.

After staff review, the application may be able to make a second claim:

The uploaded file satisfies this requested item.

That is still an item-level result. It does not prove that every other required item in the request has been resolved.

The misleading implementation usually collapses several different facts into one flag:

uploaded = true
received = true
request_complete = true
Enter fullscreen mode Exit fullscreen mode

Those transitions look convenient, but they skip the questions between them.

A more honest sequence is:

No upload
→ Waiting on client

File uploaded
→ Pending review

Staff confirms the stated criteria are met
→ Received

Staff determines the file cannot satisfy the item
→ Needs reupload
Enter fullscreen mode Exit fullscreen mode

Each transition has different evidence and a different next owner.

When the request turns green too early, the first debugging question should not be “Did the file upload?”

It should be:

Which exact claim caused the request to be displayed as complete?

Debug the item before debugging the request

A request-level badge is a summary of several requested items.

If the summary looks wrong, I would inspect the item-level facts before changing the color, button, or dashboard query.

For one bank-statement item, the diagnostic record might look like this:

Requested item: May operating account statement
Required or optional: Required
Expected document: Official bank statement
Expected source: Operating account ending in 1234
Required period: May 2026
Current item status: Pending review
Staff review result: Not recorded
Next action owner: Staff
Request-level impact: Keeps request open
Enter fullscreen mode Exit fullscreen mode

That record immediately explains why the request should not be complete.

A file exists, but the review decision does not.

The same fields help diagnose a different failure:

Requested item: May sales report
Required or optional: Required
Expected source: Online sales platform
Required period: May 1–31, 2026
Current item status: Needs reupload
Staff review result: Wrong reporting period
Next action owner: Client
Request-level impact: Keeps request open
Enter fullscreen mode Exit fullscreen mode

The UI does not need to infer the problem from Sales Report (1).pdf. The reason, owner, and effect on the request remain attached to the original item.

That is the structure behind the bookkeeping document request completion criteria template I published.

The template is not an automatic validation engine. It provides the observable fields needed to understand why an item is waiting, received, or being returned for replacement.

Required and optional change the request-level result

One common completion bug comes from treating every requested item identically.

Suppose a request contains four items:

  • Required bank statement — Received
  • Required payroll summary — Pending review
  • Required sales report — Needs reupload
  • Optional transaction support — Waiting on client

The request should remain open because two required items are unresolved.

The optional item may add useful context, but under the firm’s current criteria it does not automatically block completion.

Now change only one field:

Optional transaction support
→ Required transaction support
Enter fullscreen mode Exit fullscreen mode

The request-level result changes even though the upload activity does not.

That is why Required and Optional cannot be treated as universal properties of document types.

A bank statement may be required for one client and period. A supporting receipt may be optional in one request but necessary in another. The decision depends on the firm’s workflow, service scope, client, and bookkeeping period.

For debugging purposes, the useful rule is not:

Every item must have a file.

It is closer to:

Every item currently marked required must reach the firm’s accepted operational result.

Even that rule should remain separate from accounting completeness or professional sufficiency. It only describes completion of the current document request under the firm’s stated criteria.

The next-action owner exposes reminder bugs

Completion logic and reminder logic often fail together.

An uploaded payroll report is waiting for staff review. Its current status is Pending review, and the next action belongs to the team.

If the client receives another “Please upload your payroll report” reminder, the problem is not that the file disappeared.

The reminder query ignored ownership.

The status table should make the distinction visible:

  • Waiting on client → next action belongs to the client
  • Pending review → next action belongs to staff
  • Needs reupload → replacement action belongs to the client
  • Received → no further collection action for that item

This gives the team a useful debugging test:

Is the notification being sent to the person who currently owns the next action?

If the answer is no, changing the message wording will not fix the underlying problem.

The item may have the correct status while the reminder system still treats every unresolved item as client work.

A request can remain open because staff review is unfinished without sending another reminder to the client.

That is an important distinction. “Open” describes the request. It does not identify who should act next.

Keep the completion evidence observable

The easiest way to create another false-green bug is to make the criteria sound more powerful than the application actually is.

A completion field should describe something staff can observe.

For a period report, that might mean:

  • the expected platform or source is identifiable
  • the bookkeeping period is identifiable
  • the file is readable
  • the file is ready for staff review

It should not quietly claim that the software automatically:

  • verified financial accuracy
  • reconciled the report to the ledger
  • detected every missing page
  • matched every transaction
  • decided professional sufficiency

Those decisions require separate implementation, evidence, or human judgment.

The completion criteria should therefore make manual review clearer rather than pretending to remove it.

A reviewer can record that the expected source and period are visible, then choose Received or Needs reupload.

The product preserves that decision and the next action. It does not need to impersonate an accountant to make the request workflow useful.

Make the green checkmark narrow and honest

A completion badge should answer one question at one level.

For an upload:

The file transfer succeeded.

For a requested item:

Staff reviewed the submission and marked this item received under the firm’s stated criteria.

For the request:

The required items in this request no longer have unresolved collection or review work.

Those meanings should not be interchangeable.

When the interface turns green too early, the fastest fix is rarely changing the badge itself. Trace the conclusion backward:

  • Which item produced the result?
  • Was it required or optional?
  • Was it uploaded or reviewed?
  • What did staff decide?
  • Who owns the next action?
  • Does the item keep the request open?

If those facts remain visible, the completion indicator becomes easier to debug because it no longer depends on a vague complete = true.

The most useful green checkmark is not the one that appears fastest.

It is the one that makes the narrowest claim the workflow can actually support.

Top comments (0)