#128 (on prod since #129) handled most of #126. Automated reports now reopen a ticket closed inside AUTO_REOPEN_WINDOW_DAYS, even though prod's Workflow Designer requires admin + comment for Closed -> Open. But #128 also removed recurrence_noted entirely. The decision comment keeps one case: a workflow with no Closed -> Open transition at all is a deliberate "never reopen" setup.
Change
Closed -> Open exists, whatever it requires: reopen to Open (reopened). Same as #128. People still need what the workflow says.
No Closed -> Open transition: the ticket stays Closed and the response is recurrence_noted. No notification is sent.
Reports run hourly, and this path is what posted 2,110 "could not be reopened" comments before #123. So it now leaves one note per closed period; later reports while the ticket stays Closed only write the audit row.
The audit row still feeds the recurrence counts in the history comment.
Two concurrent reports can't both post the note: lockByHash holds the ticket row FOR UPDATE.
The helpers are AutoTicketService::reopenConfigured() and recurrenceNotedSince(). The README documents the rule and the recurrence_noted action again.
Prod is unchanged: it has an active Closed -> Open (admin + comment), so reports inside the window keep reopening.
Tests
The end-to-end script from #124 was run against a local stack with a throwaway DB and synthetic data, in three workflow configurations:
Mode
Closed -> Open
Result
prod
admin + comment (as on prod)
43/43 pass, inside the window -> reopened, audit row says the workflow was skipped
open
no requirements
43/43 pass, reopened
none
no transition
46/46 pass: recurrence_noted, stays Closed, one note, the second report adds no note, both reports audited, history counts include the noted reports
phpcs (.phpcs.xml) is clean. The dev server logged no PHP warnings.
Closes #126.
## Background
#128 (on prod since #129) handled most of #126. Automated reports now reopen a ticket closed inside `AUTO_REOPEN_WINDOW_DAYS`, even though prod's Workflow Designer requires admin + comment for Closed -> Open. But #128 also removed `recurrence_noted` entirely. The [decision comment](https://code.lotusguild.org/LotusGuild/tinker_tickets/issues/126#issuecomment-7196) keeps one case: a workflow with **no** Closed -> Open transition at all is a deliberate "never reopen" setup.
## Change
- **Closed -> Open exists, whatever it requires:** reopen to Open (`reopened`). Same as #128. People still need what the workflow says.
- **No Closed -> Open transition:** the ticket stays Closed and the response is `recurrence_noted`. No notification is sent.
- Reports run hourly, and this path is what posted 2,110 "could not be reopened" comments before #123. So it now leaves **one note per closed period**; later reports while the ticket stays Closed only write the audit row.
- The audit row still feeds the recurrence counts in the history comment.
- Two concurrent reports can't both post the note: `lockByHash` holds the ticket row `FOR UPDATE`.
- The helpers are `AutoTicketService::reopenConfigured()` and `recurrenceNotedSince()`. The README documents the rule and the `recurrence_noted` action again.
**Prod is unchanged:** it has an active Closed -> Open (admin + comment), so reports inside the window keep reopening.
## Tests
The end-to-end script from #124 was run against a local stack with a throwaway DB and synthetic data, in three workflow configurations:
| Mode | Closed -> Open | Result |
|---|---|---|
| `prod` | admin + comment (as on prod) | 43/43 pass, inside the window -> `reopened`, audit row says the workflow was skipped |
| `open` | no requirements | 43/43 pass, `reopened` |
| `none` | no transition | 46/46 pass: `recurrence_noted`, stays Closed, one note, the second report adds no note, both reports audited, history counts include the noted reports |
phpcs (`.phpcs.xml`) is clean. The dev server logged no PHP warnings.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
#128 made automated reports reopen a ticket closed inside the reopen
window regardless of the Workflow Designer's admin/comment requirements,
and dropped recurrence_noted entirely. The #126 decision keeps one case:
a workflow with no Closed -> Open transition at all is a deliberate
"never reopen" setup, so the ticket stays Closed and the response is
recurrence_noted.
That path is what posted 2,110 "could not be reopened" comments before
#123, so it now leaves one note per closed period; later reports while
the ticket stays Closed only write the audit row (which still feeds the
recurrence counts). No notification is sent when nothing reopened.
Prod has an active Closed -> Open (admin + comment), so prod behaviour
is unchanged: reports inside the window reopen.
Closes#126
Co-Authored-By: Claude Opus 5.5 <[email protected]>
jared
scheduled this pull request to auto merge when all checks succeed 2026-11-28 23:22:46 -05:00
jared
merged commit 8168f70f3d into development2026-11-28 23:23:31 -05:00
jared
deleted branch auto-reopen-no-transition2026-11-28 23:23:32 -05:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #126.
Background
#128 (on prod since #129) handled most of #126. Automated reports now reopen a ticket closed inside
AUTO_REOPEN_WINDOW_DAYS, even though prod's Workflow Designer requires admin + comment for Closed -> Open. But #128 also removedrecurrence_notedentirely. The decision comment keeps one case: a workflow with no Closed -> Open transition at all is a deliberate "never reopen" setup.Change
reopened). Same as #128. People still need what the workflow says.recurrence_noted. No notification is sent.lockByHashholds the ticket rowFOR UPDATE.AutoTicketService::reopenConfigured()andrecurrenceNotedSince(). The README documents the rule and therecurrence_notedaction again.Prod is unchanged: it has an active Closed -> Open (admin + comment), so reports inside the window keep reopening.
Tests
The end-to-end script from #124 was run against a local stack with a throwaway DB and synthetic data, in three workflow configurations:
prodreopened, audit row says the workflow was skippedopenreopenednonerecurrence_noted, stays Closed, one note, the second report adds no note, both reports audited, history counts include the noted reportsphpcs (
.phpcs.xml) is clean. The dev server logged no PHP warnings.🤖 Generated with Claude Code