#834 open
Thomas Aylott

API, Changing milestone adds extra comment body

Reported by Thomas Aylott | May 6th, 2008 @ 01:12 PM | in Phase Deuce

When changing the milestone of a ticket through the API it adds a new comment to that ticket with the body of the ticket as the body of the ticket comment.

I expected there to be no comment unless I explicitly added one.

Comments and changes to this ticket

  • Will

    Will May 7th, 2008 @ 02:58 AM

    • → State changed from “new” to “open”

    Is it just on http://digerata.lighthouseapp.co... or with every instances of updating the milestone via the API? I don't have anything with the API setup right now, so I have to wait for Rick to take a look at this. I can't even try to reproduce it. Maybe tomorrow I'll get that setup.

  • Will

    Will May 7th, 2008 @ 10:13 PM

    • → Milestone changed from “” to “Phase Deuce”
  • rick

    rick May 7th, 2008 @ 10:47 PM

    Oh I think I know what's happening here. Are you using the ruby API for this? I'm guessing when you grab the ticket, it naturally grabs the body too. The whole thing is then being posted back in the XML, so it creates the duplicate update.

    For now you can just set body = '' before you update, so that the ticket xml sends (or better yet, no body tag at all). I may just make the ticket body blank in the XML, so that you're forced to loop through the ticket's versions to get the comment stream. That's essentially what the HTML version of the ticket form does.

    The other option is to modify the ruby API to automatically set body = '' unless it's explicitly set.

    Lighthouse will always add a new comment for every change you make, even if the body is nil. It has to track all changes to the ticket for historical purposes.

  • Thomas Aylott

    Thomas Aylott May 7th, 2008 @ 10:40 PM

    Yeah. that makes good sense.

    I might think about thinking about forking the api and changing that.

    Might need a spec or two.

  • rick

    rick May 7th, 2008 @ 10:47 PM

    Okay, I decided to make the ticket skip the . It'll be deployed tonight.

  • Will

    Will May 8th, 2008 @ 02:02 AM

    Thomas, it should be working now. I haven't tested it as of yet, still working on other things. But if you confirm I can go ahead and close this one.

  • Thomas Aylott

    Thomas Aylott May 28th, 2008 @ 01:55 AM

    Yeah. Setting the body to "" doesn't solve this.

    Any other suggestions?

  • rick

    rick May 28th, 2008 @ 01:24 PM

    I don't think I send the body tag for tickets anymore, so it should work fine. Setting it to '' won't work, because then it will send an empty <body>.

  • Thomas Aylott

    Thomas Aylott May 28th, 2008 @ 03:05 PM

    I think the problem came up when I was creating a ticket and then

    updating it without refetching it in between.

    Thomas Aylott [SubtleGradient] from iPhone

    On May 28, 2008, at 4:24 PM, Lighthouse

    wrote:

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Using Lighthouse to track Lighthouse.

Shared Ticket Bins

People watching this ticket