Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

get-mcasfile doesn't filter on "Other" parameter #109

@silviews

Description

@silviews

There is a problem with get-mcasfile with -Filetype Other or "0" . The filer is ignored & all results are returned.
My understanding is when passing 0 as int, returning false.

if ($Filetype)        {$filterSet += @{'fileType'=@{'eq'= ([int[]]($Filetype | ForEach-Object {$_ -as [int]}))}}}
if ($FiletypeNot)     {$filterSet += @{'fileType'=@{'neq'=([int[]]($FiletypeNot | ForEach-Object {$_ -as [int]}))}}}

'

Limits the results to items of the specified file type. Value Map: 0 = Other,1 = Document,2 = Spreadsheet, 3 = Presentation, 4 = Text, 5 = Image, 6 = Folder.

    [Parameter(ParameterSetName='List', Mandatory=$false)]
    [ValidateNotNullOrEmpty()]
    [file_type[]]$Filetype,

    # Limits the results to items not of the specified file type. Value Map: 0 = Other,1 = Document,2 = Spreadsheet, 3 = Presentation, 4 = Text, 5 = Image, 6 = Folder.
    [Parameter(ParameterSetName='List', Mandatory=$false)]
    [ValidateNotNullOrEmpty()]
    [file_type[]]$FiletypeNot,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions