App Assistance: Copy Ticket Subject to Clipboard

  • 3 April 2019
  • 2 replies

I am trying to build a custom FreshService app that copies the ticket subject to the clipboard when executed.  I have the following code, but when i launch the app from inside a ticket, it appears nothing happens.  Not sure what I am doing wrong, but would love help if anyone has it.


$(document).ready( function() {
        .then(function(_client) {
          var client = _client;
            function() {
                    .then(function(data) {
						subject = data.ticket.subject;
						var temp_holder = document.createElement("input");
						temp_holder.setAttribute("id", "subject");
						document.getElementById("subject").value = subject;;
						client.interface.trigger("showNotify", {
							type: "success",
							message: "Subject Copied to Clipboard"

 Thank you


This topic has been closed for comments

2 replies


Not sure if you resolved this yet but the ticket number for the field you are looking for should be data.ticket.display_id. 

Turned out to be a chrome extension blocking the execution of the app.  Disabled extension and things seemed to work ok.  now the challenge i am facing is that returns a very long integer, but not the actual ticket number in the helpdesk.  does anyone know the ticket data field that contains the actual ticket number?