Skip to content

Instantly share code, notes, and snippets.

@dpawluk
Created October 3, 2016 16:09
Show Gist options
  • Select an option

  • Save dpawluk/4810bed1cfa8b6755c76c1c74324ef21 to your computer and use it in GitHub Desktop.

Select an option

Save dpawluk/4810bed1cfa8b6755c76c1c74324ef21 to your computer and use it in GitHub Desktop.
updating a ticket with author_id on comment using ruby client
ticket_to_update = client.ticket.find(:id => 4037) #Get the ticket we are updating
author_user = client.users.search(query: "[email protected]").first #now get the user object for said author (wrapper expects user objects for author_id I think...
ticket_to_update.comment = {value: "some comment", public: true, author_id: author_user.id } #update the comment, author_id, etc
ticket.save! #save it
#this worked for me
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment