tag:help.lighthouseapp.com,2008-09-20:/discussions/api-developers/812-callback-behavior-changedLighthouse: Discussion 2014-04-07T18:17:17Ztag:help.lighthouseapp.com,2008-09-20:Comment/237015142013-01-11T00:39:53Z2013-01-11T00:39:53ZCallback behavior changed<div><p>There was an emergency rails security hole that forced our hand,
unfortunately. It wasn't supposed to break anything.</p></div>Tiger Teamtag:help.lighthouseapp.com,2008-09-20:Comment/237015142013-01-11T00:40:25Z2013-01-11T00:40:25ZCallback behavior changed<div><p>Can you give me the exact xml you're looking for/what it used to
look like?</p></div>Tiger Teamtag:help.lighthouseapp.com,2008-09-20:Comment/237015142013-01-11T00:44:38Z2013-01-11T00:44:38ZCallback behavior changed<div><p>Sure! (Yeah been a fun day with that huh? Been dealing with that
on this end too).</p>
<p>So, here's an example of what we received previously:</p>
<pre>
<code>{"version":{"assigned_user_id":null, "attachments_count":0, "body":"TEST", "body_html":"<div><p>TEST</p></div>", "closed":false, "created_at":"2012-07-17T15:53:42Z", "creator_id":99775, "diffable_attributes":{"assigned_user":192510}, "milestone_id":117059, "number":185, "permalink":"add-watchers-to-notifications", "priority":3, "project_id":68849, "state":"open", "tag":"", "title":"Add watchers to notifications", "updated_at":"2012-07-17T15:54:45Z", "user_id":99775, "version":8, "watchers_ids":[99775, 73699, 192510], "user_name":"Joe Keeley", "creator_name":"Joe Keeley", "assigned_user_name":null, "url":"http://dfsw.lighthouseapp.com/projects/68849/tickets/185", "milestone_title":"Test Milestone", "priority_name":"Low"}, "domain_name":"dfsw"}</code>
</pre>
<p>Notice the <a href="null">assigned_user_name</a> in there. Now
it is being omitted.</p></div>Joe Keeleytag:help.lighthouseapp.com,2008-09-20:Comment/237015142013-01-11T01:53:13Z2013-01-11T01:53:13ZCallback behavior changed<div><p>So weirdly enough I can't reproduce this on an older version of
our code and gems!</p>
<p>Do you know when exactly it broke? Are you sure your code didn't
change?</p>
<p>The crazy thing is, here's what our actual json/xml generator
looks like:</p>
<pre>
<code> [:user_name, :creator_name, :assigned_user_name, :url, :milestone_title].each do |method|
if value = send(method)
options[:methods] << method
end
end</code>
</pre>
<p>i.e. if that thing is nil, don't put it in the xml/json dump.
This code hasn't changed in, like, ever.</p></div>Tiger Teamtag:help.lighthouseapp.com,2008-09-20:Comment/237015142013-01-11T16:55:37Z2013-01-11T16:55:38ZCallback behavior changed<div><p>Hi Courtenay - my apologies - I investigated further and it
looks like I updated that test case manually to make sure we
covered it, but it didn't match how you send the data back. Having
one of those "how did this ever work" moments...anyway we'll adjust
to handle it correctly knowing this. Thank you for the quick
reply.</p></div>Joe Keeleytag:help.lighthouseapp.com,2008-09-20:Comment/237015142013-01-11T17:52:40Z2013-01-11T17:52:40ZCallback behavior changed<div><p>I have those every day! comes from having a code base going back
to 2007. Heh.</p></div>Tiger Team