Skip to main content

Hi!

I want to do exactly the same function as there https://support.freshdesk.com/support/discussions/topics/14436

to reply and set ticket status as resolved in one click. 


Unfortunately that solution doesnt work in current version.

 

One suggestion is you can set up a Freshplug to create a button.

Go to Admin--> Integrations--> Freshplug to create one. Make sure that you select the option to have the Freshplug widget visible on the tickets page.





Send and Resolve Button







<div id="add_btn_send_resolve_in_reply"></div>



<script type="text/javascript">



jQuery(document).ready(function() {



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



var buttonLabel = 'Send and Resolve';



//Adding the new button



jQuery('#HelpdeskReply .btn-toolbar>span:last').before('<span class="btn-group"><button class="btn" rel="custom-reply-status" data-cnt-id="cnt-reply" data-status-val="4">' + buttonLabel + '</button></span>');



//Moving the Save Draft to the left side.



jQuery('#reply-draft').detach().appendTo('.post_in_forum');



jQuery('#add_btn_send_resolve_in_reply').parent().parent().remove();



}



});



</script>

 



So I am trying to create my own plugin. I put him there:

https://developers.freshdesk.com/v2/images/ticket-top-navigation-1bf307d7.png


and after click on that button I am changing the status of ticket to "resolved" but I can't trigger "reply button". I was trying:



 

$('#send-and-set').click();

jQuery('#send-and-set').click();

jQuery(this.$container).find("#send-and-set")

 and it doesn't work. 


Any advice?