Skip to main content

The default view of the ticket replies is in chronological order. When you have more than two or three exchanges in a conversation, scrolling down to see the latest reply, every single time, gets aggravating. When this Freshplug is installed, the order of ticket replies can be reversed so that the latest reply is displayed first and the first response is displayed last.


Instructions


1. Download the zip file.

2. Unzip and open the .txt file

3. Copy the code from the file

4. Go to Admin->Integration->Freshplugs in you dashboard and click the new Freshplug button

5. Give a Name and Description to this plug for future reference

6. Select the text box “Show this widget in ticket view page”

7. Copy the code from the .txt file here and click the button "create and enable"

change_the_order_of_ticket_replies_main_screenshot_13102.pngthumbnail_13102.png
Followed the instructions to paste the code in. Pasted it above the <nav> div and below the <footer>.

it doesn't do anything.

 


Hi Freshdesk, 


Where do I go to add this information? I cannot find where you edit the footer


Hi,


This is default code available in Footer area of Admin->Helpdesk Rebranding->Customize Portal->Pages and Layout tab.


<footer class="footer rounded-6">

 <nav class="footer-links pull-right">

  {{ portal | link_to_privacy_policy }}

  {{ portal | link_to_cookie_law }}

 </nav>

 {% if portal.tabs.size > 0 %}

  <nav class="footer-links">

   {% for tab in portal.tabs %}

    <a href="{{tab.url}}" class="{% if tab.tab_type == current_tab %}active{% endif %}">{{ tab.label }}</a>

   {% endfor %}

  </nav>

 {% endif %}

</footer>

{{ portal | portal_copyright }}


Paste the code given (in the attachment) below this default code.


Samyuktha, I have done instructed, and nothing is highlighted and the order is still newest at the bottom.


Footer code is now:

<footer class="footer rounded-6">
<nav class="footer-links pull-right">
{{ portal | link_to_privacy_policy }}
{{ portal | link_to_cookie_law }}
</nav>
{% if portal.tabs.size > 0 %}
<nav class="footer-links">
{% for tab in portal.tabs %}
<a href="{{tab.url}}" class="{% if tab.tab_type == current_tab %}active{% endif %}">{{ tab.label }}</a>
{% endfor %}
</nav>
{% endif %}
</footer>
{{ portal | portal_copyright }}



It seems the code I added was deleted/ignored after i clicked save and publish


 


Hey Guys


Sorry for the trouble caused here


There is a small backend update, that needs to be done, before this code starts working.

This code change will be pushed by 1-2 weeks time. I will notify you, once this is done.

BTW, if the CODE is not saving, can you try to hit the Save & Publish, 2-3 times, there is a small Memcache issue, which causes this


thanks

vijay


Hi All


I've made changes to the code and now you may use this Freshplugs to change the Order of replies to Reverse mode


regards
Vijay


Just to update on this Freshplugs.

This above code can be implemented via Freshplugs alone in Admin > Integrations and there is no need to use CSS/JS, as in the Estate plan. It can be done, if you wish to have some advanced customizations


Hope this clarifies


regards
Vijay


Installed this an it works well. Except, it scrolls to the bottom of the page. Can you make it go back to the top of the page please?


thanks


This is only changing the Order of Tickets in the Portal right? Is there a chance to do the same for Tickets in Helpdesk View?

 


I attempted to install this and it hasn't changed the ticket list for our customers.  


I also echo Albert's question on tickets in the helpdesk view, but in this case, trying to fix the customer issue above.




I inserted the code in the txt of the above ZIP into a new Fresh Plug and enabled it.

What I expecte to happen was that the this would change the order in ticket replies from 1,2,3,4 to 4,2,3,1
so the latest reply would always be on top.

Unfortunatley what happens is pretty much nothing.
What am I doing wrong?

Regards.
Bruno

 




Hello,

I have to say I am disappointed that the advised solution to this request is a complicated plug-in. Surely this is a widey-requested feature that should be implemented as a simple Admin setting?


See my comments on this subject here => https://support.freshdesk.com/support/discussions/topics/13447

Thanks

Michael




I too have implemented this Freshplug and it does not do anything.  Has anyone gotten this to work?


Dan




I would agree that this functionality needs to be a standard feature of the application.




I was given this code snippet to replace the above code.  It seems to work well and reorder the comments correctly


 

<div id="reverse_ticket_replies_order"></div>



<script type="text/javascript">

if(jQuery('body').hasClass('ticket_details')){

jQuery('#reverse_ticket_replies_order').closest('.widget').removeClass('widget');

jQuery(document).on("ticket_view_loaded",function(event,data){

jQuery('.redactor').insertAfter('#original_request');

});



jQuery(document).off('note_created note_updated activities_toggle ticket_view_loaded ticket_show_more sidebar_loaded');



function changeOrder(id){

var ID = =];

jQuery('#' + id).find(".conversation").each(function(){

ID.push(jQuery(this).attr('data-timestamp'));

});

ID = ID.sort().reverse();

jQuery(ID).each(function(i,item){

jQuery('#' + id).append(jQuery('(data-timestamp=' + item + ']'));

});

}



function reorderNotes(){

var id_value;

if(jQuery('#all_notes').length)

{

id_value = "all_notes";

}

else

{

id_value = "all_activities";

}

changeOrder(id_value);

}



jQuery(document).on('note_created note_updated activities_toggle ticket_view_loaded ticket_show_more sidebar_loaded', function(ev, data) {

reorderNotes();

console.log('test');

});

}

</script>

 


Thanks for sharing the Code Dan.
Did id work by you on the Customer Portal also?
@FreshdeskDevs it would be great if you could implement a function that make that also possible on Customer Portal Side.




How is this enable don the front-end for the customers?  Seems very strange that this is not a standard Freshdesk option in admin settings.  I already had a customer complain about having to scroll all the way down.  


We are paying monthly for this service.  Please add the functionality already.  This thread was opened two years ago!




Resurfacing this thread...Has anyone implemented this Freshplug successfully?  I followed the steps and nothing has changed either. 




For customer site, you have only to extend the liquid code with "reversed" as seen below:





I was unsuccessful in trying this plug. Any idea on how to get this to work?


Thanks,

Adam 


Hi Adam,


Here is the "Portal Pages/Ticket details" code that we used to make it appear inverted (+ title on top):


<section class="main content rounded-6 min-height-on-desktop">

 <div class="breadcrumb">

  <a href="{{ portal.home_url }}">{% translate header.tabs.home %}</a>

  <a href="{{ portal.tickets_home_url }}">{% translate portal.tickets.ticket_list %}</a>

 </div>

 

 <section class="ticket-main">

  {{ ticket | status_alert }}

 

  <h2 class="heading">#{{ ticket.id }} {{ ticket.subject | h}}</h2>



  {% if portal.user %}

   <section class="toolbar-actions" id="ticket-toolbar">

    <span class="hide-tablet pull-right">

     <a href="#ticket-sidebar" class="btn btn-icon btn-small btn-primary"

      title="More ticket details" data-toggle="tooltip">

      <i class="icon-cog-drop-light"></i>

     </a>

    </span>

    <div class="btn-group" id="ticket-toolbar">

     {% unless ticket.closed? %}

      <a href="#reply-to-ticket" class="btn btn-small"

       data-proxy-for="#add-note-form" title="{% translate reply %}"

       data-toggle="tooltip">

        <i class="icon-reply"></i>

      </a>

      <a href="{{ ticket.close_ticket_url }}" data-method="post"

       class="btn btn-small" data-toggle="tooltip"

       title="{% translate portal.tickets.mark_closed %}">

        <i class="icon-close-ticket"></i>

      </a>

      <a href="#add-people" rel="freshdialog"

       title="{% translate portal.tickets.add_people_title %}" data-width="400" class="btn btn-small" data-submit-label="{% translate portal.tickets.add_people %}" data-toggle="tooltip" data-close-label="{% translate close %}" title="{% translate portal.tickets.add_people %}">

        <i class="icon-add-people"></i>

      </a>

     {% endunless %}

    </div>

   </section>

  {% endif %}







  <section id="ticket-comments">

   <section id="reply-to-ticket" name="reply-to-ticket" class="user-comment {% if ticket.closed? %}hide{% endif %}">

    <div class="user-info">

     {{ portal.user | profile_image:'user-pointer-bottom', '40px', '40px' }}

     <div class="user-details">

      <h4 class="user-name">{{ portal.user.name | h}}</h4>

     </div>

    </div>

    <div class="p-content" rel="image-enlarge">

     <input type="text" class="special span12"

       placeholder="{% translate portal.tickets.reply_placeholder %}" id="add-note-form-proxy"

       data-proxy-for="#add-note-form" />



     <div id="add-note-form" class="hide">

      {% snippet ticket_reply %}

     </div>

    </div>

   </section>

   {% for comment in ticket.public_comments reversed %}

    <section class="user-comment {% if comment.by_agent %} comment-by-agent {% endif %}"

       id="ticket-note-{{ comment.id }}">



     <div class="user-info">

      {{ comment.user | profile_image:'user-pointer-bottom', '40px', '40px' }}

      <div class="user-details">

       <h4 class="user-name">{{ comment.user.name | h }}</h4>

       <div class="p-info" title="{{ comment.created_on | short_day_with_time }}">{% translate portal.said %} {{ comment.created_on | time_ago }}</div>

      </div>

     </div>

     

     <div class="p-content" rel="image-enlarge">

      <div class="p-desc">

       {{ comment | custom_survey_data}}

       {{ comment.description }}

       {{ comment | freshfone_audio_dom }}

      </div>



      {{ comment | comment_attachments }}



     </div>

    </section>

   {% endfor %}

   {% if ticket.closed? %}

    {{ ticket | status_alert }}

   {% endif %}

   <!-- Old reply to ticket section goes here -->

  </section>

 

  <section class="user-comment" id="ticket-description">

   <div class="user-info">

   {% if ticket.outbound_email? %}

    {{ ticket.outbound_initiator | profile_image:'user-pointer-bottom', '40px', '40px' }}

    <div class="user-details">

     <h4 class="user-name">{{ ticket.outbound_initiator.name | h}}</h4>

     <div class="p-info">{% translate portal.reported %} {{ ticket.created_on | time_ago }}</div>

    </div>

   {% else %}

    {{ ticket.requester | profile_image:'user-pointer-bottom', '40px', '40px' }}

    <div class="user-details">

     <h4 class="user-name">{{ ticket.requester.name | h}}</h4>

     <div class="p-info">{% translate portal.reported %} {{ ticket.created_on | time_ago }}</div>

    </div>

   {% endif %}

   </div>

   <div class="p-content" rel="image-enlarge">

    <div class="p-desc">

     {{ ticket.description_html }}

     {{ ticket | freshfone_audio_dom }}

    </div>



    {{ ticket | ticket_attachemnts }}

   </div>

  </section>

 

 </section>

</section>



<section class="sidebar content rounded-6" id="ticket-sidebar">

 {% assign agent = ticket.agent %}

 {% if agent_visible == true and agent %}

  <div class="widget agent-details">

   <h3 class="lead">{% translate agent_working_on_this_ticket %}</h3>

   {{ agent | profile_image:'', '40px', '40px' }}

   <div><b>{{ agent.name }}</b></div>

   <div>{{ agent.job_title }}</div>

  </div>

 {% endif %}



 {% snippet ticket_survey %}

 

 {% snippet ticket_details %}

</section>



{% snippet ticket_add_people %}



*** For your information, this is the ONLY change we've made to the layout of that page.


Cheers!







This is a stripped down version that will work with the agent view only.






 



<script type="text/javascript">

jQuery(document).ready(function(){

var con = document.getElementById('all_notes');

var els = Array.prototype.slice.call(con.childNodes);

for (var i = els.length -1; i>=0; i--) {

con.appendChild(elssi]);

}

})

</script>

</style>




 






Hi All






Does any one know if this is still relevant?






I've just been looking in the admin area and I think this looks like very old information. Can one of the customers services people update this and let me know what the answer is.






2nd Update Request - 






I too am receiving requests to change our ticket response from ascending to descending order. I'm not a programmer and would appreciate learning of, hopefully, a easier way to implement this change. We are using the Estate plan. 






Anyone able to get this to work? Would love to have it switched but not sure if this old code will mess up our support system. Thanks.