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

AU Payroll API LeaveApplicationID changes when a request is in Scheduled status #590

Closed
mackerelsky opened this issue May 13, 2024 · 3 comments

Comments

@mackerelsky
Copy link

For some reason a leave request in the AU payroll API has a different LeaveApplicationID when the request is in scheduled status from processed or rejected status. The processed and rejected statuses both have the same LeaveApplicationID, but the ID changes when the request moves into scheduled, and then changes back when it moves out of scheduled status. LeaveApplicationID seems like it should remain constant regardless of the status of the leave request.

Copy link

PETOSS-421

Copy link

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

@Sallyhornet
Copy link
Contributor

This is a behaviour in Xero and is not related to the SDK.

When a leave is first requested it exists as a LeaveRequest entity only, and has its own id.

When a requested leave is approved, an EntitlementAdjustment entity gets created, with its own id, which is the new LeaveApplicationID that is returned in the approval response, and should be used for any interactions with that leave after that point.

When an approved leave is Rejected, the EntitlementAdjustment record is removed, and the original LeaveRequest remains with an updated status for historical purposes. At that point the LeaveApplicationID that gets returned should be the original id.

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

2 participants