Getting accurate comment.type

7 Comments

  • Joey
    Comment actions Permalink

    Hi Nicole-

    The 'comment.type' is specific to the current comment - say you were to select 'Internal note' and then call this it would return the correct data. FWIW, I like to test this out in our REPL app, please consider giving it a whirl.

    This is something I can bring up with our product team - 'ticket.comments' not returning this value seems less than ideal.

    That said, you could try using 'client.request' with our Ticket Audits endpoint. Rather than publicReply or internalNote, the response contains a public key with a boolean value that might be leveraged. Hope this helps!

    0
  • Nicole Smith
    Comment actions Permalink

    Hi Joseph --

    Thanks so much for your quick reply. I'm still a little confused as to what you mean regarding the 'comment.type' being specific to the current comment. Do you mean the comment that is being edited at that time?

    Is there any way to get an existing comment's data (type and date specifically) using the ZAF API? Making a ton of API calls is really not the way I'd like to go if possible. 

    0
  • Joey
    Comment actions Permalink

    Hi Nicole-

    That is correct, I was referring to the comment being edited at that current time. There isn't a one-stop method of doing this with ZAF outside of the client.request() method against the ticket audits endpoint as I mentioned earlier.

    The next time I meet with the PM for ZAF I will bring this up!

    Best,

    Joey

    0
  • Aleksey Kislov
    Comment actions Permalink

    Just stumbled upon the same issue. I need to determine the types of `ticket.comments` from ZAF client. Is there any update on this?

    0
  • Joey
    Comment actions Permalink

    Hi Nicole-

    client.get('comment.type') will return the type that is being currently worked on, so if you were to toggle to 'Internal Note' and call it you would see the response change to reflect it. It won't return historical data. What exactly are you trying to do?

    0
  • Aleksey Kislov
    Comment actions Permalink

    I'm not Nicole but I need to get only public comments of the ticket  with ZAF client. 

    0
  • Joey
    Comment actions Permalink

    Hi Aleksey-

    I thought that ticket.comments would return the type, but it seems it doesn't - I am going to bring this up with our devs. In the meantime, from what I can tell you'd have to use client.request and leverage our REST API to pull the comments and look for the public boolean key.

    1

Please sign in to leave a comment.

Powered by Zendesk