-
Notifications
You must be signed in to change notification settings - Fork 67
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
Get-GSDriveFile -Fields parameter is never honored #190
Labels
Comments
@WJurecki - Thanks for opening this up! I'm on it, I appreciate the detail! |
@WJurecki - with default behavior untouched and still picking up the default value for |
scrthq
added a commit
that referenced
this issue
May 31, 2019
…, #197 (#198) ## 2.28.0 * [Issue #188](#188) * Added: `Get-GSDriveFile` now supports specifying a full file path. * Fixed: `Get-GSDriveFile` will now replace any special path characters in the filename with underscores * Added: The File object returned by `Get-GSDriveFile` will now include an additional `OutFilePath` property if the file is downloaded. This property will contain the full path to the downloaded file. * [Issue #190](#190) * Fixed: `Fields` parameter on `Get-GSDriveFile` and `Update-GSDriveFile` were not being honored. * [Issue #192](#192) * Added: Parameters to `Update-GSDriveFile`: * `CopyRequiresWriterPermission [switch]` * `Starred [switch]` * `Trashed [switch]` * `WritersCanShare [switch]` * [Issue #194](#194) * Added: Parameters to `Update-GSChromeOSDevice`: * `AnnotatedAssetId [string]` * `AnnotatedLocation [string]` * `AnnotatedUser [string]` * `Notes [string]` * [Issue #195](#195) * Added: `Limit` parameter with `First` alias to the following `List` functions: * `Get-GSActivityReport` * `Get-GSAdminRole` * `Get-GSAdminRoleAssignment` * `Get-GSCalendar` * `Get-GSCalendarAcl` * `Get-GSCalendarEvent` * `Get-GSChromeOSDevice` * `Get-GSDataTransferApplication` * `Get-GSDrive` * `Get-GSDriveFileList` * `Get-GSDrivePermission` * `Get-GSGmailMessageList` * `Get-GSGroup` * `Get-GSGroupMember` * `Get-GSMobileDevice` * `Get-GSResource` * `Get-GSTask` * `Get-GSTaskList` * `Get-GSUsageReport` * `Get-GSUser` * `Get-GSUserLicense` * [Issue #196](#196) * Fixed: `Get-GSTeamDrive` was not paginating through the results. * [Issue #197](#197) * Renamed: `Get-GSTeamDrive` has been changed to `Get-GSDrive`. `Get-GSTeamDrive` has been turned into an alias for `Get-GSDrive` to maintain backwards compatibility. * Replaced: `SupportsTeamDrives = $true` with `SupportsAllDrives = $true` on all functions that have it. * Miscellaneous * Fixed: `Export-PSGSuiteConfig` is faster due to safely assuming that the P12Key and/or ClientSecrets values have already been pulled from the corresponding keys. * Fixed: Incomplete documentation for `Test-GSGroupMembership`. * Added: `UseDomainAdminAccess` switch parameter to `Get-GSTeamDrive` * Removed: `Get-GSUserLicenseListPrivate` by rolling the `List` code into `Get-GSUserLicense` * Removed: `Get-GSResourceListPrivate` by rolling the `List` code into `Get-GSResource`
scrthq
added a commit
that referenced
this issue
May 31, 2019
…, #197 ## 2.28.0 * [Issue #188](#188) * Added: Get-GSDriveFile now supports specifying a full file path. * Fixed: Get-GSDriveFile will now replace any special path characters in the filename with underscores * Added: The File object returned by Get-GSDriveFile will now include an additional OutFilePath property if the file is downloaded. This property will contain the full path to the downloaded file. * [Issue #190](#190) * Fixed: Fields parameter on Get-GSDriveFile and Update-GSDriveFile were not being honored. * [Issue #192](#192) * Added: Parameters to Update-GSDriveFile: * CopyRequiresWriterPermission [switch] * Starred [switch] * Trashed [switch] * WritersCanShare [switch] * [Issue #194](#194) * Added: Parameters to Update-GSChromeOSDevice: * AnnotatedAssetId [string] * AnnotatedLocation [string] * AnnotatedUser [string] * Notes [string] * [Issue #195](#195) * Added: Limit parameter with First alias to the following List functions: * Get-GSActivityReport * Get-GSAdminRole * Get-GSAdminRoleAssignment * Get-GSCalendar * Get-GSCalendarAcl * Get-GSCalendarEvent * Get-GSChromeOSDevice * Get-GSDataTransferApplication * Get-GSDrive * Get-GSDriveFileList * Get-GSDrivePermission * Get-GSGmailMessageList * Get-GSGroup * Get-GSGroupMember * Get-GSMobileDevice * Get-GSResource * Get-GSTask * Get-GSTaskList * Get-GSUsageReport * Get-GSUser * Get-GSUserLicense * [Issue #196](#196) * Fixed: Get-GSTeamDrive was not paginating through the results. * [Issue #197](#197) * Renamed: Get-GSTeamDrive has been changed to Get-GSDrive. Get-GSTeamDrive has been turned into an alias for Get-GSDrive to maintain backwards compatibility. * Replaced: SupportsTeamDrives = True with SupportsAllDrives = True on all functions that have it. * Miscellaneous * Fixed: Export-PSGSuiteConfig is faster due to safely assuming that the P12Key and/or ClientSecrets values have already been pulled from the corresponding keys. * Fixed: Incomplete documentation for Test-GSGroupMembership. * Added: UseDomainAdminAccess switch parameter to Get-GSTeamDrive * Removed: Get-GSUserLicenseListPrivate by rolling the List code into Get-GSUserLicense * Removed: Get-GSResourceListPrivate by rolling the List code into Get-GSResource
Hey @WJurecki - This has been deployed in v2.28.0! Let me know if all is well or if you are seeing any issues! |
Hey @scrthq - This works great. Thanks! |
You bet @WJurecki !! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When
Get-GSDriveFile
is executed with the-Fields
parameter is not honored and all fields are returned.This is caused because
-Fields
is only evaluated if-Projection
is not specified, however-Projection
has a default defined as 'Full' and there is no way to prevent this. Therefore,-Fields
are never evaluated and utilized.To Reproduce
Steps to reproduce the behavior:
Get-GSDriveFile -FileId '1234'
Get-GSDriveFile -FileId '1234' -Fields 'id'
Both have same result with all fields returned and populated.
Expected behavior
when
Get-GSDriveFile -FileId '1234' -Fields 'id'
is used the returned object should only have theid
property filled.Comments
Simply removing the default on
-Projection
fixes this immediate problem, but, significantly changes default behavior. Reversing the logic so as to check-Fields
first could allow a less impactful 'fix'. I'm not certain what to suggest as the best solution.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: