diff --git a/CHANGELOG.md b/CHANGELOG.md index 7430bad8..e0e40bba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,7 +88,7 @@ * [Issue #172](https://github.com/scrthq/PSGSuite/issues/172) * Fixed: `New-GoogleService` now using `New-Object` to prevent `[Google.Apis.Util.Store.FileDataStore]::new()` constructor issues in PowerShell 4. * [Issue #173](https://github.com/scrthq/PSGSuite/issues/173) - * Added: `FolderColorRgb` parameter to `New-GSDriveFile` and `Update-GSDriveFile` - _Thanks, [@WJurecki](https://github.com/WJurecki)!_ + * Added: `FolderColorRgb` parameter to `New-GSDriveFile` and `Update-GSDriveFile` to enable setting the color of a folder in Drive - _Thanks, [@WJurecki](https://github.com/WJurecki)!_ * [PR #174](https://github.com/scrthq/PSGSuite/pull/174) - _Thanks, [@WJurecki](https://github.com/WJurecki)!_ * Fixed: `Get-GSDriveFileList` filter concatenation so it joins multiple filters with ` and ` instead of just a space ` `. diff --git a/PSGSuite/Public/Drive/Get-GSDriveFileList.ps1 b/PSGSuite/Public/Drive/Get-GSDriveFileList.ps1 index 10a45dc9..5a687ca9 100644 --- a/PSGSuite/Public/Drive/Get-GSDriveFileList.ps1 +++ b/PSGSuite/Public/Drive/Get-GSDriveFileList.ps1 @@ -90,6 +90,7 @@ function Get-GSDriveFileList { if ($Filter) { $Filter += "'$ParentFolderId' in parents" $PSBoundParameters['Filter'] += "'$ParentFolderId' in parents" + } else { $Filter = @("'$ParentFolderId' in parents") $PSBoundParameters['Filter'] = @("'$ParentFolderId' in parents") @@ -119,8 +120,8 @@ function Get-GSDriveFileList { foreach ($key in $PSBoundParameters.Keys) { switch ($key) { Filter { - $FilterFmt = $PSBoundParameters[$key] -replace " -eq ","=" -replace " -like ",":" -replace " -match ",":" -replace " -contains ",":" -creplace "'True'","True" -creplace "'False'","False" -replace " -in "," in " -replace " -le ",'<=' -replace " -ge ",">=" -replace " -gt ",'>' -replace " -lt ",'<' -replace " -ne ","!=" -replace " -and "," and " -replace " -or "," or " -replace " -not "," not " - $request.Q = $($FilterFmt -join " and ") + $FilterFmt = ($PSBoundParameters[$key] -join " and ") -replace " -eq ","=" -replace " -like ",":" -replace " -match ",":" -replace " -contains ",":" -creplace "'True'","True" -creplace "'False'","False" -replace " -in "," in " -replace " -le ",'<=' -replace " -ge ",">=" -replace " -gt ",'>' -replace " -lt ",'<' -replace " -ne ","!=" -replace " -and "," and " -replace " -or "," or " -replace " -not "," not " + $request.Q = $FilterFmt } Spaces { $request.$key = $($PSBoundParameters[$key] -join ",") @@ -132,11 +133,11 @@ function Get-GSDriveFileList { } } } - if ($Filter) { - Write-Verbose "Getting all Drive Files matching filter '$Filter' for user '$User'" + if ($FilterFmt) { + Write-Verbose "Getting all Drive Files for User '$User' matching Filter: $FilterFmt" } else { - Write-Verbose "Getting all Drive Files for user '$User'" + Write-Verbose "Getting all Drive Files for User '$User'" } [int]$i = 1 do { diff --git a/README.md b/README.md index 4f142438..5f8067c5 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,15 @@ Update-GSSheetValue Export-GSSheet [Full CHANGELOG here](https://github.com/scrthq/PSGSuite/blob/master/CHANGELOG.md) +#### 2.26.1 + +* [Issue #172](https://github.com/scrthq/PSGSuite/issues/172) + * Fixed: `New-GoogleService` now using `New-Object` to prevent `[Google.Apis.Util.Store.FileDataStore]::new()` constructor issues in PowerShell 4. +* [Issue #173](https://github.com/scrthq/PSGSuite/issues/173) + * Added: `FolderColorRgb` parameter to `New-GSDriveFile` and `Update-GSDriveFile` to enable setting the color of a folder in Drive - _Thanks, [@WJurecki](https://github.com/WJurecki)!_ +* [PR #174](https://github.com/scrthq/PSGSuite/pull/174) - _Thanks, [@WJurecki](https://github.com/WJurecki)!_ + * Fixed: `Get-GSDriveFileList` filter concatenation so it joins multiple filters with ` and ` instead of just a space ` `. + #### 2.26.0 * [Issue #169](https://github.com/scrthq/PSGSuite/issues/169) @@ -152,20 +161,3 @@ Update-GSSheetValue Export-GSSheet * Updated: `New-GSUser` and `Update-GSUser` to add in Location support * Miscellaneous * Improved pipeline support for the `User` parameter across all pertinent functions, i.e. Drive, Calendar, Gmail, Sheets & Tasks APIs. - -#### 2.25.3 - -* Miscellaneous - * Added: Pipeline support for `Remove-GSCalendarEvent` - -#### 2.25.2 - -* [Issue #167](https://github.com/scrthq/PSGSuite/issues/167) - * Fixed: `Switch-PSGSuiteConfig -SetToDefault` failing with invalid scope errors - -#### 2.25.1 - -* [PR #165](https://github.com/scrthq/PSGSuite/pull/165) - _Thanks, [@scv-m](https://github.com/scv-m)!_ - * Updated: `Get-GSCourseParticipant` now supports pipeline input for CourseId to enable piping `Get-GSCourse` into it. -* [Issue #166](https://github.com/scrthq/PSGSuite/issues/166) - * Fixed: `Update-GSUser` would fail to update user phones due to incorrect variable name in the Process block, effectively skipping it.