From 700d77c9d65e0909de591be3f5965f7a70684fa0 Mon Sep 17 00:00:00 2001 From: Nate Ferrell Date: Fri, 26 Apr 2019 15:14:53 -0500 Subject: [PATCH] !deploy v2.26.4 with fix for #177 ## 2.26.4 * [Issue #177](https://github.com/scrthq/PSGSuite/issues/177) - _Thanks, [@WJurecki](https://github.com/WJurecki)!_ * Fixed: Fields parameter Get-GSDriveFileList would not set correctly with the default fields value, breaking the expected experience. Restored the same functionality --- CHANGELOG.md | 6 ++++++ PSGSuite/PSGSuite.psd1 | 2 +- PSGSuite/Public/Drive/Get-GSDriveFileList.ps1 | 8 ++++---- README.md | 5 +++++ 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44e08ffb..981ea741 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog * [Changelog](#changelog) + * [2.26.4](#2264) * [2.26.3](#2263) * [2.26.2](#2262) * [2.26.1](#2261) @@ -85,6 +86,11 @@ *** +## 2.26.4 + +* [Issue #177](https://github.com/scrthq/PSGSuite/issues/177) - _Thanks, [@WJurecki](https://github.com/WJurecki)!_ + * Fixed: `Fields` parameter `Get-GSDriveFileList` would not set correctly with the default fields value, breaking the expected experience. Restored the same functionality + ## 2.26.3 * [Issue #182](https://github.com/scrthq/PSGSuite/issues/182) - _Thanks, [@aitcriver](https://github.com/aitcriver)!_ diff --git a/PSGSuite/PSGSuite.psd1 b/PSGSuite/PSGSuite.psd1 index 5b2b8411..8606f092 100644 --- a/PSGSuite/PSGSuite.psd1 +++ b/PSGSuite/PSGSuite.psd1 @@ -12,7 +12,7 @@ RootModule = 'PSGSuite.psm1' # Version number of this module. - ModuleVersion = '2.26.3' + ModuleVersion = '2.26.4' # ID used to uniquely identify this module GUID = '9d751152-e83e-40bb-a6db-4c329092aaec' diff --git a/PSGSuite/Public/Drive/Get-GSDriveFileList.ps1 b/PSGSuite/Public/Drive/Get-GSDriveFileList.ps1 index 0b7fb401..5dfe76be 100644 --- a/PSGSuite/Public/Drive/Get-GSDriveFileList.ps1 +++ b/PSGSuite/Public/Drive/Get-GSDriveFileList.ps1 @@ -125,15 +125,15 @@ function Get-GSDriveFileList { if ($PageSize) { $request.PageSize = $PageSize } - foreach ($key in $PSBoundParameters.Keys) { + if ($Fields) { + $request.Fields = "$($Fields -join ",")" + } + foreach ($key in $PSBoundParameters.Keys | Where-Object {$_ -notin @('Fields','PageSize')}) { switch ($key) { Filter { $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 } - Fields { - $request.Fields = "$($Fields -join ",")" - } Spaces { $request.$key = $($PSBoundParameters[$key] -join ",") } diff --git a/README.md b/README.md index aeadc9b0..003509cc 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,11 @@ Update-GSSheetValue Export-GSSheet [Full CHANGELOG here](https://github.com/scrthq/PSGSuite/blob/master/CHANGELOG.md) +#### 2.26.4 + +* [Issue #177](https://github.com/scrthq/PSGSuite/issues/177) - _Thanks, [@WJurecki](https://github.com/WJurecki)!_ + * Fixed: `Fields` parameter `Get-GSDriveFileList` would not set correctly with the default fields value, breaking the expected experience. Restored the same functionality + #### 2.26.3 * [Issue #182](https://github.com/scrthq/PSGSuite/issues/182) - _Thanks, [@aitcriver](https://github.com/aitcriver)!_