Repository navigation
feat(update): rename a ticket via subject (2.7.0) - #16
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
subjecttoPATCH /api/tickets-update.php/{number}.json.ticket__cdataand search follow.editedwith old/new subject, userAPI;lastupdateis bumped.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