Automated reports reopen closed tickets regardless of the workflow #128

Merged
jared merged 1 commits from auto-reopen-bypass-workflow into development 2026-11-28 03:02:00 -05:00
Owner

This follows up #123/#124 with the operator's decision on the reopen rule.

Change

  • Reopen: when an automated report matches a ticket closed less than AUTO_REOPEN_WINDOW_DAYS (7) ago, the ticket is now reopened to Open, even though prod's Workflow Designer requires admin + comment for Closed → Open.
  • Why the workflow rule couldn't apply: no unattended reporter can give admin + comment. Under that rule every such report only added a "could not be reopened" note, and 2,110 of them piled up before #123.
  • People are unchanged: reopening by hand still goes through the workflow.
  • Audit: the entry reads auto-reopened by <app> (issue recurred; automated reopen skips the Workflow Designer).
  • recurrence_noted is gone: that response action is no longer returned, and its unused workflow lookup is removed.
  • Older tickets: tickets closed more than 7 days ago still get a new linked ticket. That rule is unchanged, and it's already working on prod: 703260823 → 425680336.

Not changed (operator decision)

The history comment's "seen N times" count stays as it is: it counts reports, so for 425680336 it says 168 in 7 days.

Verified locally (throwaway DB)

  • End-to-end: 42/42 with prod's workflow (Closed → Open needs admin + comment) and 42/42 with an unattended transition. Within the window, both now give reopened and the ticket is Open.
  • Audit: the reopen audit row carries the new reason.
  • Lint: phpcs is clean.

No UI change, so this PR has no screenshots.

🤖 Generated with Claude Code

This follows up #123/#124 with the operator's decision on the reopen rule. ## Change - **Reopen:** when an automated report matches a ticket closed less than `AUTO_REOPEN_WINDOW_DAYS` (7) ago, the ticket is now **reopened to Open**, even though prod's Workflow Designer requires admin + comment for Closed → Open. - **Why the workflow rule couldn't apply:** no unattended reporter can give admin + comment. Under that rule every such report only added a "could not be reopened" note, and 2,110 of them piled up before #123. - **People are unchanged:** reopening by hand still goes through the workflow. - **Audit:** the entry reads `auto-reopened by <app> (issue recurred; automated reopen skips the Workflow Designer)`. - **`recurrence_noted` is gone:** that response action is no longer returned, and its unused workflow lookup is removed. - **Older tickets:** tickets closed more than 7 days ago still get a new linked ticket. That rule is unchanged, and it's already working on prod: 703260823 → 425680336. ## Not changed (operator decision) The history comment's "seen N times" count stays as it is: it counts reports, so for 425680336 it says 168 in 7 days. ## Verified locally (throwaway DB) - **End-to-end:** 42/42 with prod's workflow (Closed → Open needs admin + comment) and 42/42 with an unattended transition. Within the window, both now give `reopened` and the ticket is Open. - **Audit:** the reopen audit row carries the new reason. - **Lint:** phpcs is clean. No UI change, so this PR has no screenshots. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jared added 1 commit 2026-11-28 02:47:49 -05:00
Automated reports reopen closed tickets regardless of the workflow
Lint / PHP (phpcs PSR-12) (push) Successful in 1m16s
Lint / JS (eslint) (push) Successful in 22s
Lint / PHP requirements (version + extensions) (push) Successful in 42s
Lint / Deploy (push) Skipped
Lint / Notify on failure (push) Skipped
Lint / PHP (phpcs PSR-12) (pull_request) Successful in 1m9s
Lint / JS (eslint) (pull_request) Successful in 21s
Lint / PHP requirements (version + extensions) (pull_request) Successful in 46s
Lint / Deploy (pull_request) Skipped
Lint / Notify on failure (pull_request) Skipped
Security / PHP Security (semgrep) (push) Successful in 3m3s
Security / PHP Security (semgrep) (pull_request) Successful in 3m7s
bd3e6f936b
Operator decision: a report on a ticket closed less than
AUTO_REOPEN_WINDOW_DAYS ago reopens it to Open even though prod's
Workflow Designer requires admin + comment for Closed -> Open. No
unattended reporter can satisfy that, so the rule only ever produced a
"could not be reopened" note on every report (2,110 before #123). The
audit entry records that the reopen skipped the workflow; people still
go through it. The recurrence_noted action is no longer returned.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
jared merged commit 3687b157df into development 2026-11-28 03:02:00 -05:00
Sign in to join this conversation.