Couple of bugs in Add-PWSavedSearch and Add-PWSavedSearchOrGroup

I ran a script to create a saved search in a work area, search was an or search with 2 search terms. First was looking for files with Status of Exported, 2nd was for files with Status 'CheckedOut'

When I open the search in Search Builder I can see it created the search with 2 or group tabs, but the 2 Status terms are both in the first Or Group. Also the search for 'CheckedOut' was listed as Document is '' with just the 2 quote marks.

I tested creating a single term search and the status for 'CheckedOut' was still just the 2 quote marks.

Script:

$pwfSplat = @{
	FolderPath    = 'Path\To\Test\WorkArea'
	PopulatePaths = $true
	JustOne       = $true
}
$pwf = Get-PWFolders @pwfSplat
Write-Host "Found folder $($pwf.FullPath)"
Write-Host "Creating Search Term 1"
$searchterm1 = @{
	SearchName       = 'Checked Out or Exported'
	ViewName         = 'Managed Workspace'
	OwnerProject     = $pwf
	ReplaceExisting  = $true
	SearchFolder     = $pwf.FullPath
	SearchSubFolders = $true
	Status           = 'Exported'
}
$result = Add-PWSavedSearch @searchterm1 -verbose

Write-Host "Search Term 1 Created, Creating Search Term 2"
$searchterm2 = @{
	SearchName       = (Join-Path $pwf.FullPath 'Checked Out or Exported')
	SearchFolder     = $pwf.FullPath
	SearchSubFolders = $true
	Status           = 'CheckedOut'
}
$result = Add-PWSavedSearchOrGroup @searchterm2 -verbose
Write-Host "Search Term 2 Created"

Screenshots of results:

- OR Group (1) from creating both search terms

- OR Group (2)

Parents Reply Children
No Data