In its current state, the Helpdesk Ticket form lacks a few key capabilities that would greatly improve usability and customization:
- Dynamic Link Fields & Dependencies
- Adding a Dynamic Link field (e.g., “Related DocType”) does not render the record chooser.
- Field Dependency rules ignore Dynamic Link parent fields, preventing conditional show/hide or mandatory logic.
- Client Script
onloadfor New Tickets
- Custom client scripts attached to the Ticket doctype only fire on existing records.
- When users click New Ticket (desk or portal), the
onloadevent is not triggered, so initialization logic (default values, API calls, UI adjustments) never runs.
- Autofill Origin Context
- Redirecting from a document (e.g.,
/app/ticket/new?doctype=Item&docname=ITEM-0001) does not populate thedoctypeanddocnamefields. - Agents lose valuable context about which record prompted the support request.
Proposed Features:
- Dynamic Link Rendering: Recognize and render Dynamic Link fields in the Helpdesk form with the standard DocType chooser.
- Enhanced Field Dependency: Extend dependency engine to evaluate Dynamic Link values for conditional logic.
- Consistent
onloadExecution: Ensure the Frappeonloadclient script trigger runs for both new and existing Ticket documents in desk and portal views. - Autofill Context Fields: Parse URL parameters (e.g.,
?doctype=Item&docname=ITEM-0001) or context object on form load, and setdoctypeanddocnamefields automatically.
Implementing these changes will allow tickets to directly reference related records, enable conditional form behavior, and ensure initialization scripts run reliably—streamlining both customer experience and agent workflows.
Feedback, suggestions, or any additional context are welcome!