Retrieve ticket comments - how?

Tomas Coesens's Avatar

Tomas Coesens

25 May, 2009 12:24 PM

Hi guys,

I was wondering how I can retrieve the comments for a particular ticket via the API. I can get the tickets, I can get the messages, but I want the latest comment for a particular ticket.

Any thoughts on how to achieve this?

With kind regards


  1. 1 Posted by jacob on 06 Jul, 2009 04:05 AM

    jacob's Avatar

    Each Project can have any number of Tickets. . You can read complete instruction here
    Quickly find home based business jobs from providers of home based employment opportunities.

  2. 2 Posted by davyde on 07 Jul, 2009 09:53 PM

    davyde's Avatar

    I'd also like to know how to do this.

    How does one access versions? When i grab a list of ticket's it says there is no versions attribute.

  3. 3 Posted by Justin Palmer on 14 Jul, 2009 11:10 PM

    Justin Palmer's Avatar

    You should get this information when you fetch an individual ticket. Instead of comment, it's called . See "Get Ticket" on this page:

      <assigned-user-id type="integer"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>#{unprocessed, raw body content}</body>
      <body-html>#{processed and filtered for html}</body-html>
      <created-at type="datetime">2007-01-15T08:13:09Z</created-at>
      <creator-id type="integer">1</creator-id>
      <milestone-id type="integer">2</milestone-id>
      <number type="integer">84</number>
      <project-id type="integer">2</project-id>
      <title>Provide an unwatch link in notification emails</title>
      <updated-at type="datetime">2007-02-21T16:01:55Z</updated-at>
      <user-id type="integer">1</user-id>
      <tag>deployment high</tag>
        <version type="Ticket::Version">
        <version type="Ticket::Version">
  4. 4 Posted by Davyde on 22 Jul, 2009 02:31 PM

    Davyde's Avatar

    Sorry Justin,

    Thanks for your help with the REST interface

    I should have been more specific, my question is to do with the Ruby API.

    How do i do this using the Ruby API, when you retrieve a group of tickets with the Ruby library, the ticket objects do not have a "versions", property or method.

    Any pointers would be great.

    Thanks again

  5. 5 Posted by Rick on 28 Jul, 2009 02:36 AM

    Rick's Avatar

    You have to retrieve a single ticket to get the comments. Otherwise there'd be too much data to fetch for ticket collections.

  6. 6 Posted by Tomas Coesens on 30 Jul, 2009 08:20 AM

    Tomas Coesens's Avatar

    Thanks a lot for the response, works like a charm!

Discussions are closed to public comments.
If you need help with Lighthouse please start a new discussion.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac