Open bvandervoorn opened 6 months ago
When a contract is deleted, it becomes a ghost record in the API. A contract without start or enddate. I would like to change line 357, to make sure these ghost records don't enter HelloID.
My suggestion: ($.Enddate -as [datetime] -ge (Get-Date).AddDays(-$cutOffDays) -or ([string]::IsNullOrEmpty($.Enddate) -and -not [string]::IsNullOrEmpty($_.Startdate)) )
if we are going to remove records, we should have a way to log the counts. Also log the array of removed employeeIds as debug message.
When a contract is deleted, it becomes a ghost record in the API. A contract without start or enddate. I would like to change line 357, to make sure these ghost records don't enter HelloID.
My suggestion: ($.Enddate -as [datetime] -ge (Get-Date).AddDays(-$cutOffDays) -or ([string]::IsNullOrEmpty($.Enddate) -and -not [string]::IsNullOrEmpty($_.Startdate)) )