Automated reports reopen a ticket closed under 7 days ago, whatever the Workflow Designer requires of people #126

Closed
opened 2026-11-27 10:34:55 -05:00 by jared · 1 comment
Owner

Follow-up to #123 / #124, raised in #124's "Decision needed" section. The operator chose reopen (2026-11-27).

Today on prod

  • Workflow Designer: Closed -> Open needs admin + comment, and so does Closed -> In Progress.
  • create_ticket_api.php (around line 267) only reopens when isTransitionAllowed('Closed', 'Open', false) is true, or when some transition from Closed needs neither a comment nor admin.
  • So on prod, a report that matches a ticket closed under AUTO_REOPEN_WINDOW_DAYS ago never reopens it. The ticket stays Closed and gets a "recurrence noted" comment, which is easy to miss. That happened on 993441773.
  • This affects Gandalf, hwmonDaemon and Thor alike. After 7 days, new_recurrence already works.

Wanted

Within the window, an automated report reopens the matching ticket (action reopened), as the thor#1 contract says.

Options

  1. Code: automated reports may reopen regardless of the workflow (recommended).
    • The create API skips the requires_admin / requires_comment check for this one transition.
    • Its reopen always writes its own recurrence comment, so the "comment" requirement is effectively met. Admin is a rule for people, not for API keys.
    • People clicking Reopen still need admin + comment.
  2. Config: relax Closed -> Open in the Workflow Designer.
    • No code change, but it drops admin + comment for everyone who reopens by hand.

Either way, keep the recurrence_noted path for a workflow that has no Closed -> Open at all. Also keep the tests from #124 that cover both configurations.

Related

Follow-up to #123 / #124, raised in #124's "Decision needed" section. The operator chose **reopen** (2026-11-27). ## Today on prod - Workflow Designer: **Closed -> Open needs admin + comment**, and so does Closed -> In Progress. - `create_ticket_api.php` (around line 267) only reopens when `isTransitionAllowed('Closed', 'Open', false)` is true, or when some transition from Closed needs neither a comment nor admin. - So on prod, a report that matches a ticket closed under `AUTO_REOPEN_WINDOW_DAYS` ago never reopens it. The ticket stays Closed and gets a "recurrence noted" comment, which is easy to miss. That happened on 993441773. - This affects Gandalf, hwmonDaemon and Thor alike. After 7 days, `new_recurrence` already works. ## Wanted Within the window, an automated report **reopens** the matching ticket (action `reopened`), as the thor#1 contract says. ## Options 1. **Code: automated reports may reopen regardless of the workflow (recommended).** - The create API skips the requires_admin / requires_comment check for this one transition. - Its reopen always writes its own recurrence comment, so the "comment" requirement is effectively met. Admin is a rule for people, not for API keys. - People clicking Reopen still need admin + comment. 2. **Config: relax Closed -> Open in the Workflow Designer.** - No code change, but it drops admin + comment for everyone who reopens by hand. Either way, keep the `recurrence_noted` path for a workflow that has no Closed -> Open at all. Also keep the tests from #124 that cover both configurations. ## Related - LotusGuild/thor#1 (contract) - #123, #124 - LotusGuild/thor#12: Thor handles `reopened`, `recurrence_noted` and `new_recurrence` replies already.
Author
Owner

Decision (operator, 2026-11-27): option 1, the code path

  • Automated reports (the create API with a Bearer key) reopen a matching ticket closed under AUTO_REOPEN_WINDOW_DAYS ago, even when the Workflow Designer requires admin and a comment for Closed -> Open. The reopen writes its own recurrence comment, as it does today.
  • People reopening in the UI or through MCP still need what the Workflow Designer says (admin + comment on prod). Don't change the workflow config.
  • If the workflow has no Closed -> Open transition at all, keep recurrence_noted. That's a deliberate "never reopen" setup.
  • The response action is reopened. Thor already handles reopened, recurrence_noted and new_recurrence (thor#12). I haven't checked Gandalf or hwmonDaemon.
  • Keep #124's tests for both workflow configurations, and add one: on prod's workflow (admin + comment), an automated report within the window reopens.

The tinker_tickets session writes, reviews and merges this.

## Decision (operator, 2026-11-27): option 1, the code path - Automated reports (the create API with a Bearer key) **reopen** a matching ticket closed under `AUTO_REOPEN_WINDOW_DAYS` ago, even when the Workflow Designer requires admin and a comment for Closed -> Open. The reopen writes its own recurrence comment, as it does today. - People reopening in the UI or through MCP still need what the Workflow Designer says (admin + comment on prod). **Don't change the workflow config.** - If the workflow has **no** Closed -> Open transition at all, keep `recurrence_noted`. That's a deliberate "never reopen" setup. - The response `action` is `reopened`. Thor already handles `reopened`, `recurrence_noted` and `new_recurrence` (thor#12). I haven't checked Gandalf or hwmonDaemon. - Keep #124's tests for both workflow configurations, and add one: on prod's workflow (admin + comment), an automated report within the window reopens. The tinker_tickets session writes, reviews and merges this.
jared closed this issue 2026-11-28 23:23:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/tinker_tickets#126