Skip to content

feat(update): rename a ticket via subject (2.7.0) - #16

Merged
studio-prisma merged 1 commit into
mainfrom
feat/update-subject
Nov 7, 2026
Merged

studio-prisma merged 1 commit into
mainfrom
feat/update-subject

Conversation

@studio-prisma

Copy link
Copy Markdown
Owner

Adds subject to PATCH /api/tickets-update.php/{number}.json.

  • Stored as the answer to the ticket form field, like the staff UI; ticket__cdata and search follow.
  • Thread event edited with old/new subject, user API; lastupdate is bumped.
  • Validation before any change: string, not empty, single line without control characters, valid UTF-8, no HTML (rejected, not stripped), max length from the form field config (fallback 255). Errors return 400 and no other field of the request is applied.
  • 16 new PHPUnit tests (261 total, green). CHANGELOG, openapi.yaml, version 2.7.0.

Tested end to end in devlab (osTicket 1.18.4, PHP 8.3) and live via mcp-hub v1.15.0.

🤖 Generated with Claude Code

The update endpoint could not change the subject; renaming was only
possible in the staff UI.

PATCH /api/tickets-update.php/{number}.json accepts `subject`. It is
written as the answer of the ticket form's subject field, which also
refreshes ticket__cdata and the subject search, and it is logged as an
"edited" thread event with old and new value, as Ticket::updateField()
does for the staff UI.

The subject is validated before any other change of the request:
string, trimmed, not empty, valid UTF-8, single line without control
characters, no HTML (refused, not stripped), at most the length set on
the subject field of the ticket form (255 if none). Errors are 400.

Version 2.7.0.
@studio-prisma
studio-prisma merged commit acd21f8 into main Nov 7, 2026
8 checks passed
@studio-prisma
studio-prisma deleted the feat/update-subject branch November 7, 2026 18:21
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.

1 participant