Hello,
I need to insert a new status in the frappe helpdesk “working”, I tried using the property setter, but the modification is not reflected in the user panel. Does anyone have any suggestions on how to add this new customized status?
thanks
U need to used workflow doctype to create new workflow
but for support module it is linked with the SLA so you need to make sure to update it correctly
Maybe add a new custom field to indicate this via HD Ticket template?
develop ← RitvikSardana:feat-custom-sla-status
opened 03:52PM - 13 Aug 25 UTC
**Issue:**
The whole codebase of Helpdesk was hardcoded with Open/Replied/Resol… ved/Closed statuses. This resulted in a lot of rigidity in the system and a lot of workarounds to adapt to people's workflows.
**Solution:**
Make statuses a first-class feature.
Introduce `HD Ticket Status` DocType, which is mapped to a category of SLA.
Open = SLA continues, Paused = SLA is paused, Resolved = SLA clock stops.
Creating a new status
<img width="1440" height="476" alt="Screenshot 2025-08-25 at 12 42 11 PM" src="https://github.com/user-attachments/assets/5beb37c6-3eb6-4c48-9962-644f954d1577" />
Use these statuses and categories to calculate the SLA of a ticket.
**SLA Improvements:**
1. The Total Hold Time calculation previously included non-working hours and holidays, which caused inaccuracies. Since the Resolution Time field correctly excluded non-working hours and holidays, the mismatch led to incorrect resolution times.
The fix ensures that Total Hold Time is now calculated using only working hours, excluding non-working hours and holidays. As a result, the Resolution Time field is accurate and correctly reflects the actual time taken to resolve a ticket within working hours.
2. Previously, to calculate Resolution Time and Response Time, we used the function `calc_elapsed_time`.
This function was highly inefficient, as it iterated minute by minute from the ticket’s start date to end date, checking whether each minute was a working minute.
For example, if a ticket was created on Friday and closed on Monday, the function would loop through all 4,320 minutes( this number grows linearly as we increase the number of days) in that time span. This excessive iteration caused ticket closure to be extremely slow.
With the new fix, we calculate working minutes far more efficiently. Instead of iterating through every minute, the function now only processes once per day within the range (in the above example, just three iterations)
This optimization has **increased** the **performance** by **1,440x**, resulting in significantly faster ticket closure performance.
3. We used to calculate the Resolution Time of the ticket again when the status changed from Resolved to Closed, which resulted in incorrect resolution time. So we have now fixed this.
4. Correct calculation of resolution time & response time in the UI.
**What changed?**
1. New DocType "HD Ticket Status"
2. Remove mapping of SLA doctype to "pause" & "fulfilled". Status should control the SLA, not vice versa. 4. Removed old child doctypes "HD SLA Fulfilled on status" & "HD Pause SLA on Status"
3. New fetch from field in **HD Ticket** DocType "status_category", this helps to track and SLA clock and make changes accordingly.
4. 2 new fields in HD Settings to set the default status of the ticket when it is created & when the customer replies to the ticket. By default, both are set to "Open" status. Similar fields in HD SLA doctype (this is preferred if the value is set)
5. Correct Dashboard analytics with correct resolution time.
6. Existing Reports now support Custom Statuses
<img width="1440" height="479" alt="HD Settings" src="https://github.com/user-attachments/assets/8bb306af-f3df-4fe9-9ad9-b8abb6a93ef1" />
<img width="1439" height="780" alt="HD SLA" src="https://github.com/user-attachments/assets/4e65b4d3-743c-4ea3-a24b-8c87ef60e1e4" />
7. Correct SLA information in the UI.
8. A lot of improvements in SLA calculation.
Creating Status from Desk:
<img width="1440" height="476" alt="Screenshot 2025-08-25 at 12 42 11 PM" src="https://github.com/user-attachments/assets/01d6504b-54fc-4eab-a658-f8ce1b9253fd" />
How these are reflected in the UI (Agent Portal):
<img width="1439" height="777" alt="Screenshot 2025-08-25 at 4 55 54 PM" src="https://github.com/user-attachments/assets/a605e521-63a9-459f-ae62-ee9893add35a" />
closes #2017 , closes #2367 , closes #2476 , closes #1542
docs: https://docs.frappe.io/helpdesk/ticket-status
The feature is now live, you can check the documentation and create custom statuses
2 Likes