Callback behavior changed

Joe Keeley's Avatar

Joe Keeley

11 Jan, 2013 12:36 AM

Hi - it looks like the callback handler behavior changed when un-assigning a user from a ticket. Previously the callback would return "null" for assigned_user_name; now the assigned_user_name element is omitted (which unfortunately breaks our app badly). Can we be notified when changes like this are happening to the api?


  1. Support Staff 1 Posted by Tiger Team on 11 Jan, 2013 12:39 AM

    Tiger Team's Avatar

    There was an emergency rails security hole that forced our hand, unfortunately. It wasn't supposed to break anything.

  2. Support Staff 2 Posted by Tiger Team on 11 Jan, 2013 12:40 AM

    Tiger Team's Avatar

    Can you give me the exact xml you're looking for/what it used to look like?

  3. 3 Posted by Joe Keeley on 11 Jan, 2013 12:44 AM

    Joe Keeley's Avatar

    Sure! (Yeah been a fun day with that huh? Been dealing with that on this end too).

    So, here's an example of what we received previously:

    {"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":"", "milestone_title":"Test Milestone", "priority_name":"Low"}, "domain_name":"dfsw"}

    Notice the assigned_user_name in there. Now it is being omitted.

  4. Support Staff 4 Posted by Tiger Team on 11 Jan, 2013 01:53 AM

    Tiger Team's Avatar

    So weirdly enough I can't reproduce this on an older version of our code and gems!

    Do you know when exactly it broke? Are you sure your code didn't change?

    The crazy thing is, here's what our actual json/xml generator looks like:

          [:user_name, :creator_name, :assigned_user_name, :url, :milestone_title].each do |method|
            if value = send(method)
              options[:methods] << method

    i.e. if that thing is nil, don't put it in the xml/json dump. This code hasn't changed in, like, ever.

  5. 5 Posted by Joe Keeley on 11 Jan, 2013 04:55 PM

    Joe Keeley's Avatar

    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.

  6. Support Staff 6 Posted by Tiger Team on 11 Jan, 2013 05:52 PM

    Tiger Team's Avatar

    I have those every day! comes from having a code base going back to 2007. Heh.

  7. brandi closed this discussion on 18 Jan, 2013 06:37 PM.

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