start to add new features

This commit is contained in:
Mark Gregory
2026-06-23 11:24:17 +01:00
parent 4ee0b8e604
commit aec6989053
11 changed files with 201 additions and 28 deletions
+99
View File
@@ -201,3 +201,102 @@ Issue resolved and verified.
The requested work has been completed and no further action is currently required. This ticket is now closed.
```
## Ticket Workflow Stabilisation Checklist
This module treats the following workflows as mandatory production Helpdesk behaviour. Future changes must preserve these flows and update tests when behaviour changes.
### Create ticket
1. Open **Helpdesk > Tickets > Create**.
2. Enter a subject and details.
3. Use the browser spell checker in the subject and details editor before submitting.
4. Attach supporting files where useful.
5. Click **Create Ticket** once.
Validation must run only after **Create Ticket** is clicked. Rich-text editor synchronisation must not trigger premature validation or require a second click.
### Public reply
1. Open a ticket.
2. Choose **Public reply**.
3. Enter the response.
4. Submit the response.
A public reply is visible in the conversation and counts toward the first-response SLA. The first public response should set the first response timestamp once and must not be overwritten by later replies.
### Internal note
1. Open a ticket.
2. Choose **Internal note**.
3. Enter staff-only information.
4. Submit the note.
Internal notes are not customer-visible and must not satisfy the public first-response SLA.
### Close ticket
1. Open the ticket controls.
2. Select a closed status.
3. Enter a mandatory closure comment when prompted.
4. Choose whether the closure comment is public or internal.
5. Confirm **Close ticket**.
The closure comment is required for auditability. The resolution SLA should be recorded after closure.
### Reopen ticket
1. Open a closed ticket.
2. Select an open or in-progress status.
3. Add a reopen reason where the UI requires one.
4. Continue with public replies, internal notes, timers and attachments.
The original closure history must remain intact.
### SLA
The SLA panel must show clear operational wording:
- Awaiting public reply.
- Due soon.
- SLA met.
- Responded late.
- Breached.
It should show who first responded, when they responded, and how long it took. SLA audit events should be retained for review.
### Timer
1. Start a timer only when work begins.
2. The live elapsed timer appears only while the timer is running.
3. End the timer when work stops.
4. Confirm the saved time in the ticket log.
Timer UI must not leave hidden or unused JavaScript files behind.
### Attachments
Attachments may be added to tickets and responses. Uploaded files must remain validated by type and size, stored safely, and associated with the correct ticket/comment.
### Ticket reference sequence
Ticket references must be generated from `helpdesk_ticket_sequences` when the migration has run. The sequence row is locked during ticket creation, and the initial value is calculated from all existing ticket references, including soft-deleted tickets. This avoids duplicate references such as reusing `HD-2026-00002`.
### Spell checking
Browser-native spell checking is enabled on ticket subjects, details, public replies, threaded replies, timer notes and closure comments using `spellcheck="true"` and `lang="en-GB"`.
### Regression coverage expected
The module should keep tests around:
- Create ticket submit-only validation.
- Body editor synchronisation.
- Public and internal replies.
- Mandatory closure comments.
- Reopen behaviour where implemented.
- SLA state and audit trail updates.
- Timer start/end logging.
- Attachment validation and association.
- Reference sequence collision prevention.
- Browser spellcheck attributes on writable fields.