Skip to content

feat(tickets)!: remove ticketState, it reads open on every ticket - #300

Merged
SyniRon merged 1 commit into
developfrom
agent/claim-explain-issue-296
Nov 3, 2026
Merged

SyniRon merged 1 commit into
developfrom
agent/claim-explain-issue-296

Conversation

@SyniRon

@SyniRon SyniRon commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Closes #296

Summary

NF Tickets leaves xf_nf_tickets_ticket.ticket_state at its default open on every ticket. In the xenforo-dev copy that covers all 12,699 tickets, including 5,913 Resolved and 2,418 Closed. The field and its filter misreported status, so both go. Status stays in statusId and statusName.

 Ticket
   statusId
   statusName
-  ticketState

 GET /api/v1/tickets
   ?statusId
-  ?ticketState          # now an unknown param, ignored like any other

queryBinder.stringSliceField goes too, since this filter was its only caller. The testdb schema and fixtures keep the column because they mirror the forum table.

Evidence

  • Before: develop against the seeded harness database:
    $ curl .../api/v1/tickets/1 | jq '.ticket | {ticketId, ticketState, statusId, statusName}'
    {"ticketId":1,"ticketState":"open","statusId":1,"statusName":"Awaiting Support"}
    $ curl ".../api/v1/tickets?ticketState=resolved" | jq '[.tickets[].ticketId]'
    [4,7]
    $ curl .../openapi.yaml | grep -c ticketState
    3
    
    After: this branch against the same database:
    $ curl .../api/v1/tickets/1 | jq '.ticket | has("ticketState")'
    false
    $ curl .../api/v1/tickets | jq '[.tickets[] | has("ticketState")] | unique'
    [false]
    $ curl ".../api/v1/tickets?ticketState=resolved" | jq '[.tickets[].ticketId]'
    [8,9,11,10,1,2,3,4,7,6]
    $ curl .../openapi.yaml | grep -c ticketState
    0
    
  • The regenerated goldens only delete lines: 18 "ticketState" lines, plus the list_state_filter case and its golden.
  • go vet ./..., go test ./... without the harness, go test -v ./testdb ./datastores with the MariaDB harness (0 skips), and go test -race ./... with the harness all pass.

Merge Danger

Door: two-way

Releases are a manual step, so merging changes nothing in production. A revert brings the field and filter back unchanged.

Blast Radius: tickets clients

This breaks the wire shape, so the next release is 4.0.0. The tickets scope has one key holder. The tickets MCP is the only client, and it already drops ticketState from its output (src/compact.ts) and never sends the filter. A caller still sending ticketState=... gets the unfiltered list back, not an error.

Reviewed with sol-loop: 1 round with gpt-6.1-sol. Sol verdict: approved

Created with Claude Opus 5.5 in T3 Code, reviewed by gpt-6.1-sol.

Note

🤖 Opus 5.5 responding on behalf of SyniRon

NF Tickets leaves ticket_state at its default 'open' on every ticket, so
the field and its filter misreport resolved and closed tickets. Status
lives in statusId and statusName.

BREAKING CHANGE: Ticket drops ticketState and GET /api/v1/tickets drops
the ticketState filter.

Closes #296
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ceea0896-caca-47d9-bf88-61e3585a4b9d
Commits

Reviewing files that changed from the base of the PR and between ff214c4 and 477cd77.

Files selected for processing: 27
  • contract/battery.go
  • contract/fake_datastore_test.go
  • contract/goldens/tickets/get_by_id_happy.golden.json
  • contract/goldens/tickets/get_by_ref_happy.golden.json
  • contract/goldens/tickets/list_category_exclude_subcategories.golden.json
  • contract/goldens/tickets/list_category_includes_subcategories.golden.json
  • contract/goldens/tickets/list_default.golden.json
  • contract/goldens/tickets/list_page_two.golden.json
  • contract/goldens/tickets/list_per_page_camel.golden.json
  • contract/goldens/tickets/list_per_page_snake.golden.json
  • contract/goldens/tickets/list_repeated_status_filter.golden.json
  • contract/goldens/tickets/list_starter_filter.golden.json
  • contract/goldens/tickets/list_state_filter.golden.json
  • contract/goldens/tickets/list_unknown_param_ignored.golden.json
  • datastores/tickets.go
  • datastores/tickets_harness_test.go
  • openapi/openapi.yaml
  • rest/fake_tickets_test.go
  • rest/query.go
  • rest/query_fuzz_test.go
  • rest/query_test.go
  • rest/rest_test.go
  • rest/tickets.go
  • rest/tickets_test.go
  • testdb/testdb_test.go
  • types/tickets.go
  • xenforo/tickets.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@SyniRon
SyniRon force-pushed the agent/claim-explain-issue-296 branch from f9c6f7f to 477cd77 Compare November 3, 2026 20:18
@SyniRon
SyniRon merged commit 2c6394a into develop Nov 3, 2026
5 checks passed
@SyniRon
SyniRon deleted the agent/claim-explain-issue-296 branch November 3, 2026 20:28
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.

Tickets: remove ticketState, it reads open on every ticket

1 participant