ac3cloud / roust

Ruby client for Request Tracker's REST API
Other
6 stars 4 forks source link

Support comments / correspondence on tickets #18

Closed Sarah-E-Greene closed 9 years ago

Sarah-E-Greene commented 9 years ago

It'd be nice to be able to add comments / correspondence via roust.

Sarah-E-Greene commented 9 years ago

Added the support as per Ticket History Comment on http://requesttracker.wikia.com/wiki/REST, but this fails with unknown fields of action and text, and the ticket is not updated. Using https://github.com/jakubroztocil/httpie to post directly to the RT REST API also fails to update the ticket (although says that the ticket has been updated, weirdly):

http http://myrt.com/REST/1.0/ticket/1234/comment\?user\=myuser\&pass\='kittens'\&content\="id: 1234\nText: this is a test comment\nAction: comment"

HTTP/1.1 200 OK
Connection: close
Content-Encoding: gzip
Content-Type: text/plain; charset=utf-8
Date: Tue, 03 Feb 2015 04:51:46 GMT
Server: Apache/2.2.14 (Ubuntu)
Set-Cookie: RT_SID_foobar.80=12334; path=/
Transfer-Encoding: chunked
Vary: Accept-Encoding

RT/3.4.6 200 Ok

# Ticket 1234 updated.
Sarah-E-Greene commented 9 years ago

Turns out that our version of RT didn't contain the necessary section of the API. Having backported this, https://github.com/bulletproofnetworks/roust/pull/19 now works correctly.