< Back

Set-JiraFilter

Thu Jan 16, 2020 8:19 am

NAME Set-JiraFilter



SYNOPSIS

Make changes to an existing Filter.





SYNTAX

Set-JiraFilter [-InputObject] <JiraPS.Filter> [[-Name] <String>] [[-Description] <String>] [[-Credential]

<PSCredential>] [[-JQL] <String>] [-Favorite <Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Make changes to an existing Filter.



If no changing parameter is provided, no action will be performed.





PARAMETERS

-InputObject <JiraPS.Filter>

Filter object to be changed.



Object can be retrieved with `Get-JiraFilter`



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Name <String>

New value for the filter's Name.



Required? false

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Description <String>

New value for the filter's Description.



Can be an empty string.



Required? false

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-JQL <String>

New value for the filter's JQL string which the filter uses for matching issues.



More about JQL at <https://confluence.atlassian.com/displa ... +Searching>



Required? false

Position? 3

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Favorite <Boolean>

Boolean flag if the filter should be marked as favorite for the user.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Credential <PSCredential>

Credentials to use to connect to JIRA.

If not specified, this function will use anonymous access.



Required? false

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

[JiraPS.Filter] / [String]







OUTPUTS

[JiraPS.Filter]







NOTES





This function requires either the `-Credential` parameter to be passed or a persistent JIRA session. See

`New-JiraSession` for more details. If neither are supplied, this function will run with anonymous access to

JIRA.



-------------------------- Example 1 --------------------------



Set-JiraFilter -InputObject (Get-JiraFilter "12345") -Name "NewName"



Changes the name of filter "12345" to "NewName"

-------------------------- Example 2 --------------------------



$filterData = @{

InputObject = Get-JiraFilter "12345"

Description = "A new description"

JQL = "project = TV AND type = Bug"

Favorite = $true

}

Set-JiraFilter @filterData



Changes the description and JQL of filter "12345" and make it a favorite

-------------------------- Example 3 --------------------------



Get-JiraFilter -Favorite |

Where name -notlike "My*" |

Set-JiraFilter -Favorite $false



Remove all favorite filters where the name does not start with "My"



RELATED LINKS

Online Version: https://atlassianps.org/docs/JiraPS/com ... iraFilter/

Get-JiraFilter

New-JiraFilter

Remove-JiraFilter