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

Unable to push future leave requests in NZ Payroll any longer #277

Open
CyberFerret opened this issue May 19, 2024 · 3 comments
Open

Unable to push future leave requests in NZ Payroll any longer #277

CyberFerret opened this issue May 19, 2024 · 3 comments

Comments

@CyberFerret
Copy link

We are currently using version 4.3.0 of the xero-ruby gem, and recently noticed that we are no longer able to push leave applications that are future dated. Past dated leave applications still work OK, but our customers used to be able to push future dated ones as well, up until a few weeks ago.

The exception thrown by the gem is:

invalid value for "period_status", must be one of ["Approved", "Completed"].

and the backtrace is:

vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_period.rb:127 period_status=
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_period.rb:175 block in build_from_hash
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_period.rb:167 each_pair
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_period.rb:167 build_from_hash
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_period.rb:159 build_from_hash
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_periods.rb:177 _deserialize
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_periods.rb:128 block (2 levels) in build_from_hash
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_periods.rb:128 map
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_periods.rb:128 block in build_from_hash
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_periods.rb:123 each_pair

Pushing future dated leave still seems to work via direct API calls so we are a bit puzzled as to why it is no longer working via the gem.

Copy link

PETOSS-423

Copy link

Thanks for raising an issue, a ticket has been created to track your request

@CyberFerret
Copy link
Author

Update: Further investigation reveals that this exception happens when we are trying to read the NZ Leave Periods for further processing within our app. It looks like the gem doesn't know how to handle this property and store it in the returned object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant