How can I add ticket assignee field to template request page?

Respondida

7 Comentários

  • Nicole S.
    Zendesk Community Team

    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. 

    0
  • Kay
    Community Moderator

    Hi Karen Berthiaume 👋

    use this:

    {{#if assignee}}
    <dt>{{t 'assignee'}}</dt>
    <dd>
    {{assignee.name}}
    </dd>
    {{/if}}
    0
  • Karen Berthiaume

    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>

    0
  • Kay
    Community Moderator

    Yes it is, see these docs.

    I know this might sound silly.. sorry in advance. Could you check the actual ticket has an assignee?

    0
  • Karen Berthiaume

    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

     

     

    0
  • Kay
    Community Moderator

    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?

    0
  • Karen Berthiaume

    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

    0

Por favor, entrar para comentar.

Powered by Zendesk