Error when updating a ticket through the API

dougjohnston's Avatar


12 Feb, 2009 09:40 PM

Starting yesterday morning sometime, the API to update an existing ticket started breaking with "Not all elements respond to to_xml". As I have not updated my code for several days, I believe this might be an issue with the API itself.



RuntimeError in Admin/ticketsController#update : Not all elements respond to to_xml

  1. 1 Posted by dougjohnston on 14 Feb, 2009 12:08 AM

    dougjohnston's Avatar

    I'm wondering when I might see a response to this issue. This is currently causing production downtime for me and my team. Are you guys looking into this issue?

    In researching the issue further, I can see from doing a basic curl call to the API that some fields are being included twice:

      <user-name>John Parker</user-name>
      <creator-name>John Parker</creator-name>
      <assigned-user-name>Doug Johnston</assigned-user-name>
      <user-name>John Parker</user-name>
      <creator-name>John Parker</creator-name>
      <assigned-user-name>Doug Johnston</assigned-user-name>

    These are the fields that are breaking the API save method because it's trying to pass multiple identical values to to_xml.

    Can I have some assurances that you guys are working to resolve this issue? Thanks!

  2. 2 Posted by Rick on 14 Feb, 2009 01:22 AM

    Rick's Avatar

    Ah, it has to do with the multiple fields being returned. That's odd... It's probably a quick fix on our end.

  3. 3 Posted by Rick on 14 Feb, 2009 01:32 AM

    Rick's Avatar

    Ahh yup. I added some custom attributes earlier in the week so that you could get common things like the User name or Milestone title without having to make another API call. The array of custom attributes sometimes had duplicates (like the extra :url above), which causes XML parsing issues in the client library.

    I've pushed the fix out, so you should be good to go. I do realize that API testing is one of our weak points. We have some plans to automate remote API testing and documentation building soon that should help immensely in this regard.

  4. Rick closed this discussion on 14 Feb, 2009 01:32 AM.

  5. dougjohnston re-opened this discussion on 14 Feb, 2009 03:45 AM

  6. 4 Posted by dougjohnston on 14 Feb, 2009 03:45 AM

    dougjohnston's Avatar

    Thanks Rick, I'm glad to hear that it was a relatively simple fix. It's good to hear that you guys are working on testing the API more thoroughly. I've had a few API issues in the past, but nothing for the last few months. Thanks again for making the fix!

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