Open ivan-garanin opened 9 years ago
@ivan-garanin i see why you think that should work and it's definitely a bug i will fix soon.
Easy workaround is to use ticket#comment
@ https://github.com/lanej/zendesk2/blob/master/lib/zendesk2/client/models/ticket.rb#L97.
ticket.comment('test2', :html_body => '<p>test2</p>', :trusted => true, :public => true, :author_id => 1069516038})
I tried to do somethig like this:
ticket.comments.create('test2', :html_body => '<p>test2</p>', :trusted => true, :public => true, :author_id => 1069516038)
And got:
ArgumentError: wrong number of arguments (2 for 0..1)
from /Users/ivangaranin/.rvm/gems/ruby-2.2.0-preview1/gems/zendesk2-1.5.17/lib/zendesk2/paged_collection.rb:76:in `create'
I hope this will help you in your hunt:
~> ticket.comments.new(:body => 'test2', :html_body => '<p>test2</p>', :trusted => true, :public => true,
:author_id => 1069516038)
=> <Zendesk2::Client::TicketComment
id=nil,
body="test2",
html_body="<p>test2</p>",
public=true,
trusted=nil,
author_id=nil,
attachments=nil `
~> ticket.save
NotImplementedError: NotImplementedError
from /Users/ivangaranin/.rvm/gems/ruby-2.2.0-preview1/gems/zendesk2-1.5.17/lib/zendesk2/client/model.rb:7:in `save!'
as you see author_id is blank and trusted too
@ivan-garanin found the issue. see my workaround in the comment above. specifically take note of the different method ticket.comment(body, options)
.
Sorry for the carelessness. This helped me! Thank you !
I have got ticket:
I would like to create one more comment to this ticket with this command:
and I got this error:
Could you help me ? Thank you, Ivan