Skip to content

feat: update dashboard and doc APIs#2869

Open
Simoh8 wants to merge 1 commit intofrappe:developfrom
Simoh8:branch-uv16
Open

feat: update dashboard and doc APIs#2869
Simoh8 wants to merge 1 commit intofrappe:developfrom
Simoh8:branch-uv16

Conversation

@Simoh8
Copy link

@Simoh8 Simoh8 commented Jan 9, 2026

Description

This PR improves the Helpdesk app APIs used by the dashboard and document views. The changes focus on making the APIs more consistent, easier to maintain, and better aligned with current frontend usage.


Changes Included

Dashboard API

File: helpdesk/api/dashboard.py

  • Refactored logic for fetching dashboard data and ticket statistics
  • Improved response structure for better frontend consumption
  • Reduced redundant queries and simplified data aggregation

Document API

File: helpdesk/api/doc.py

  • Cleaned up and reorganized API methods used for ticket-related data
  • Improved filtering and data retrieval logic
  • Enhanced error handling and overall readability

Testing Performed

  • Ran bench migrate and bench restart successfully
  • Verified dashboard loads correctly with updated data
  • Confirmed ticket-related views continue to function as expected

Why This Change Is Needed

The previous implementation caused intermittent HTTP 500 errors during normal Helpdesk usage, particularly when loading dashboard data and ticket lists.

Observed issues included:

  • POST /api/method/helpdesk.api.dashboard.get_dashboard_data returning intermittent 500 errors
  • POST /api/method/helpdesk.api.doc.get_list_data consistently returning 500 errors when loading ticket lists

These errors caused partial or broken UI rendering in the Helpdesk dashboard and document views. The refactored APIs address these issues by improving query handling, data validation, and response consistency.

@Simoh8
Copy link
Author

Simoh8 commented Jan 9, 2026

@RitvikSardana I have made some changes on the issue i had raised earlier about "method/helpdesk.api.doc.get_list_data HTTP/1.1" 500 on Frappe Version 16 #2866
Open " you can have a look at it and share your feedback

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