-
Notifications
You must be signed in to change notification settings - Fork 0
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
Managers without an enddate cause a problem in the department script #29
Labels
bug
Something isn't working
Comments
I'd like to propose changing the manager calculation and filtering the roleassignments directly after querying the data instead of filtering and calculating this in the foreach loop.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the department script around line 319, a check is done, to see if the manager assignment is active.
When the enddate returns $null, the enddate ParseExact returns an error.
A possible sollution:
if($roleAssignment.endDate -ne $null){
$endDate = ([Datetime]::ParseExact($roleAssignment.endDate, 'yyyy-MM-dd', $null))
}else{
$endDate = ([Datetime]::ParseExact("2099-12-31", 'yyyy-MM-dd', $null))
}
The text was updated successfully, but these errors were encountered: