You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
As an "approver" when you "Decline" someone's request, the totals are still being updated to reflect the denied request as if it were approved, subtracting from the "AllottedTimeOff" Total.
To Reproduce
Have a user submit a request
Have an approver deny the request
See balances (note: For some reason, my Sharepoint lists are taking about 60 seconds to "update" through this process. It's probably a network issue, but keep an eye out for that on your end, apparently it's a known issue with SP lists?)
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
The code used to update the balances is as follows. It doesn't seem to differentiate between "Approved, Denied" in any way. I am not sure how to modify it to do such a thing.
Seems as though I posted too soon - I kept messing around with it and appear to have figured something out that seems to be working. I added an "if" statement. I'm not sure if this is going to cause other issues that I haven't ran into yet, but updated code is below... and after some quick testing, it doens't seem to be updating the time off balance any longer if a request is rejected.
Describe the bug
As an "approver" when you "Decline" someone's request, the totals are still being updated to reflect the denied request as if it were approved, subtracting from the "AllottedTimeOff" Total.
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
The code used to update the balances is as follows. It doesn't seem to differentiate between "Approved, Denied" in any way. I am not sure how to modify it to do such a thing.
Patch( TimeOffBalances, LookUp( TimeOffBalances, Employee.Email = selectedItem.'Created By'.Email && TimeOffType.Value = selectedItem.TimeOffType.Value ), { RequestedTimeOff: LookUp( TimeOffBalances, Employee.Email = selectedItem.'Created By'.Email && TimeOffType.Value = selectedItem.TimeOffType.Value ).RequestedTimeOff + selectedItem.Days } );
The text was updated successfully, but these errors were encountered: