Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time off estimate call has changed and broken the gem #5

Closed
gorenje opened this issue May 22, 2015 · 8 comments
Closed

Time off estimate call has changed and broken the gem #5

gorenje opened this issue May 22, 2015 · 8 comments
Labels

Comments

@gorenje
Copy link

gorenje commented May 22, 2015

Hi,

It seems that something has changed @ bamboo causing this gem to fail:

client = Bamboozled.client( :subdomain => SOMEDOMAIN, :api_key => API_KEY)
client.employee.time_off_estimate(EMPLID, Date.today)

Raw Response of that (at least for me):

[{"timeOffType":"9","name":"Compensation ","units":"days","balance":"...","end":"2015-05-22"} ....

i.e. an array that does not have with_indifferent_access

So that causes an exception:

undefined method `with_indifferent_access' for #<Array:0x007fd133ec7eb0>

And then the response is parsed using XML which, in turn, throws up its hands with:

MultiXml::ParseError: Start tag expected, '<' not found

I dunno with this is related to us upgrading active_support (4.2.1) or whether the response format from bamboo has changed.

gorenje pushed a commit to gorenje/bamboozled that referenced this issue May 22, 2015
Horrible hack fix for method-inc#5
@markrickert
Copy link
Contributor

Interesting... I'm the original author of the gem, however I'm no longer at Skookum and I don't use Bamboo or have access to it anymore. Perhaps @moondev or @iamdustan might be able to help out.

Good luck!

@gorenje
Copy link
Author

gorenje commented May 22, 2015

@markrickert Thanks for headsup. For us it's not an issue since we're using the patched-with-a-hack version. Perhaps if others have this issue, we can get a confirmation and a better solution!

@enriikke
Copy link
Contributor

@gorenje thanks for reporting the issue 😃 I'm taking a look at this over the weekend. Would you mind pointing me to your patched version? Hopefully we can get a universal fix for everyone.

@pkananen
Copy link

I'm having the same problem when I call client.time_off.requests:

Fatal error: Start tag expected, '<' not found at :1. (MultiXml::ParseError)

@gorenje
Copy link
Author

gorenje commented Jun 20, 2015

@enriikke my fix was this gorenje@d478a86

@enriikke
Copy link
Contributor

Thanks @gorenje & @pkananen we are putting together a roadmap for upgrading the gem and including additional functionality. I will work on a quick fix for this as well.

@Pochy9024
Copy link

I'm having a similar error trying to do client.meta.fields
MultiXml::ParseError: Start tag expected, '<' not found

@ruprict
Copy link
Contributor

ruprict commented Feb 16, 2018

This is fixed in #40.

@ruprict ruprict closed this as completed Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants