Repository navigation
feat: agents and API decide about the question when closing (v0.2.0) - #2
Merged
Merged
Conversation
A tick "Send satisfaction question" in the reply form, the note form and the status dialog of the agent panel; removing it means never for this ticket (row state declined, internal note). "No satisfaction question" / "Allow … again" in the ticket's More menu, a POST with osTicket's CSRF token and the agent's ticket permission. Closes without an agent form (API, cron, mass status change in the ticket list) follow a new setting: ask (default, as before), only when the request asks for it, or never. Requests pass feedback_ask=1|0; the flag confirms or suppresses, it never widens the rules. The note after a sent question names what triggered it.
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.
What changes
declinedplus an internal note.scp/ajax.php/feedback/ticket/<id>/decline|allowwith osTicket's CSRF token, and the agent needs access to the ticket.feedback_ask=1), never.feedback_ask=0declines.The UI gets into the ticket view through an output buffer, the same way Board adds its tab. It also works with PJAX and checks the ticket ID, so a stale script never acts on another ticket.
Related: studio-prisma/osticket-api-endpoints#18 (
feedbackfield →feedback_ask). Spec: Feedback 0.2.0 (decisions F1–F4: decline is permanent, menu switch, mass like API, API live "only when requested").Type
Security impact
FeedbackRules,FeedbackTrigger)FeedbackUi::toggle)What changes for an outsider:
checkStaffPermon the ticket. A test proves that a POST without the token is refused and changes nothing.feedback_ask: it can only confirm or suppress a question the rules allow. A declined row also blocks later questions, like "already asked". Nobody can be asked who wasn't askable before.Verification
php tests/unit.php: 155/155 (PHP 8.4)npx playwright test: 67/67. New spec9-decide.spec.jscovers: