Skip to content

Customer portal shows empty/irrelevant custom fields; no conditional field visibility in HD Ticket Template #3614

Description

@ews-pgasser

Information about bug

Problem
HD Ticket Template has no way to conditionally show/hide a field based on another field's value. Every field in a template's fields table renders on the customer portal ticket detail view regardless of relevance, showing "—" for fields that don't apply to that ticket's category/type.

Where
TicketCustomerTemplateFields.vue renders ticket.data.template.fields filtered only by hide_from_customer (static, not conditional):

<div
v-for="field in customFields"
:key="field.fieldname"
class="flex items-center gap-4"
>
<span class="w-[150px] shrink-0 text-p-sm text-ink-gray-5">{{
field.label
}}</span>
<span
class="flex-1 truncate rounded border border-outline-gray-2 bg-surface-base px-2 py-1 text-p-sm"
:class="
ticket.data[field.fieldname] ? 'text-ink-gray-9' : 'text-ink-gray-4'
"
>
{{ ticket.data[field.fieldname] || "—" }}
</span>
</div>

HD Ticket Template Field child doctype has no depends_on/conditional column — only fieldname, required, hide_from_customer, url_method, placeholder.

Example
Template has fields for both "Category A" and "Category B" flows gated by a custom_category Select. Standard DocType depends_on: eval:doc.custom_category == "..." is set on the fields, but portal doesn't evaluate depends_on at all (Desk-only JS engine), so customer always sees all fields from the template, empty ones included.

Ask
Add a depends_on (eval expression) field to HD Ticket Template Field, evaluated client-side in TicketCustomerTemplateFields.vue (and ideally TicketNew.vue for creation) same way hide_from_customer is checked now — doc. scoped to ticket.data.

Note
HD Ticket Template doctype is flagged "description": "This doctype will be deprecated in the future" (

"description": "This doctype will be deprecated in the future",
). TicketNew.vue (creation form) uses the same hide_from_customer filter and isn't the concern here, fields there are inputs, not a display of an already-submitted ticket, so an unfilled irrelevant field there doesn't read as noise. This issue is specifically about the post-creation detail view.

Version

Frappe version - 1.28.1
Frappe Helpdesk version - 16.28.0

Installation method

docker

Relevant log output / Stack trace / Full Error Message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions