Recent searches


No recent searches

Issue for getting last public comment



Posted Nov 20, 2023

Hello, I am currently facing difficulties retrieving the latest public comment, and I have not found a solution in the documentation to identify whether a comment is public or not:

The client.get(ticket.comments) route retrieves all comments from ticket, but it does not retrieve the boolean parameter 'public' for comments.



0

2

2 comments

Ok my bad.


   function requestCommentsTicket(client, id) {
      var settings = {
        url: '/api/v2/tickets/' + id + '/comments',
        type:'GET',
        dataType: 'json',
      };
    
      client.request(settings).then(
        function(data) {
          console.log('request result', data)
        },
        function(response) {
          console.log('request result', response)
        }
      );
    }

1


i think you can get the channel prop from ticket.conversation to show whether is internal or web but what you have shared is definitely easier. 

1


Please sign in to leave a comment.

Didn't find what you're looking for?

New post