How can I add ticket assignee field to template request page?
回答済みOn Help Desk template. The REQUEST Page of END USER Preview, there is a sidebar box with ticket information. It does not contain who ticket is assigned to and we want to provide that information. I found several pages in help docs that reference the "ASSIGNEE" but asked Support group to provide the syntax as it was not shown. I could not find the syntax to copy for any other page as these templates do not include the AGENT side. Below is the section of code and I've included here I want assignee to fall (italic and bolded). I've tried many things to mimic what help shows to no avail. (We became Zendesk clients long before this new HELP CENTER change. One of the features we liked was that it could be implemented and managed by a non programmer. The HELP CENTER update a few years back kind a changed that. I struggled then to convert and this is first time I'm trying to add something to one of those templates since.)
<section class="request-sidebar collapsible-sidebar">
<h5 class="collapsible-sidebar-title">{{t 'ticket_details'}}</h5>
{{#if request.followup_source_id}}
<dl class="request-details">
<dt>{{t 'followup'}}</dt>
<dd>{{link 'request' id=request.followup_source_id}}</dd>
</dl>
{{/if}}
<dl class="request-details">
<dt>{{t 'requester'}}</dt>
<dd>{{request.requester.name}}</dd>
<dt>{{t 'created'}}</dt>
<dd>{{date request.created_at}}</dd>
<dt>{{t 'last_activity'}}</dt>
<dd>{{date request.updated_at}}</dd>
<dt>{{t 'assignee'}}</dt>
<dd>{{'assignee'}}</dd>
{{#if collaborators}}
<dt>{{t 'ccs'}}</dt>
<dd>
<ul class="request-collaborators">
{{#each collaborators}}
<li title={{name}}>{{name}}</li>
{{/each}}
</ul>
</dd>
{{/if}}
</dl>
-
Hi Karen -
We've reached out to our community moderators to see if any of them can provide the code. We'll also include your question in our weekly digest to increase its visibility for other users, so that someone can hopefully provide you with the code you're looking for.
I've also edited your title so that your post will be more likely to appear in search for other users.
-
Hi Karen Berthiaume 👋
use this:{{#if assignee}}
<dt>{{t 'assignee'}}</dt>
<dd>
{{assignee.name}}
</dd>
{{/if}} -
Thanks Kay...tried that. Previewed and saw no change. So I published and saw no change. Signed off the app and back in..still no change. Am I correct that assignee is a valid variable?
<section class="request-sidebar collapsible-sidebar">
<h5 class="collapsible-sidebar-title">{{t 'ticket_details'}}</h5>
{{#if request.followup_source_id}}
<dl class="request-details">
<dt>{{t 'followup'}}</dt>
<dd>{{link 'request' id=request.followup_source_id}}</dd>
</dl>
{{/if}}
<dl class="request-details">
<dt>{{t 'requester'}}</dt>
<dd>{{request.requester.name}}</dd><dt>{{t 'created'}}</dt>
<dd>{{date request.created_at}}</dd>
{{#if assignee}}
<dt>{{t 'assignee'}}</dt>
<dd>
{{assignee.name}}
</dd>
{{/if}}<dt>{{t 'last_activity'}}</dt>
<dd>{{date request.updated_at}}</dd>{{#if collaborators}}
<dt>{{t 'ccs'}}</dt>
<dd>
<ul class="request-collaborators">
{{#each collaborators}}
<li title={{name}}>{{name}}</li>
{{/each}}
</ul>
</dd>
{{/if}}
</dl> -
Yes it is, see these docs.
I know this might sound silly.. sorry in advance. Could you check the actual ticket has an assignee? -
Does not hurt to check. I left code as I have above since it's ignoring it. Confirmed I still saw code - yes. Signed in , picked ticket that is assigned to Me, then went to that user , assumed identity, opened the ticket I know was assigned. I see headers of requestor, created, last activity and CC's but not Assignee. Confirmed all content was right but missing Assignee
-
I just tested your exact code on my account. This is the result:
It appears something else is going on. Could it be that the theme is not actually saved and published?
-
when I sign in to the Guide where you edit screens, it shows theme a Custom because I had Copenhagen with edits and has a green block that says "LIVE" and shows last updated 6/22/2020. If I click EDIT - goes to the pages where I've adjusted them to meet our logo and color schemes. I set Preview Role to 'END USER' and template to 'REQUEST PAGE". This then shows me what users see when in a ticket and has that right side block of ticket detail while left side is the ticket comments.
I click PUBLISH (always checked, then published so thought I'd switch)...no change.
Clicked Edit and get left side list of templates. So pick Request_page.hbs
scroll down to <section class="request-sidebar collapsible-sidebar">
see my info..clicked publish and when I go back to look at the publish date updates. Played around and left off the "IF" statement and now the label shows up!! but no assigne so closer. I'm looking at code again
サインインしてコメントを残してください。
7 コメント