AtlassianPS / JiraPS

PowerShell module to interact with Atlassian JIRA
https://AtlassianPS.org/module/JiraPS
MIT License
321 stars 131 forks source link

Allow fields to be filtered by id only in Get-JiraField (mainly for use in Set-JiraIssue) #476

Open PiotrBaran1010 opened 1 year ago

PiotrBaran1010 commented 1 year ago

Description

This is a fix for a situation I have encountered, where someone created a field with a duplicated name, which then caused Set-JiraIssue to be unable to set a value for previously existing field, since Get-JiraField returned two values, while only one of the fields were present in the issue I was updating, resulting in "Field 'xxx' cannot be set. It is not on the appropriate screen, or unknown." error. Added switches to Get-JiraField and Set-JiraIssue that allow user to call the fields directly by their id's, which allows to bypass this issue.

Motivation and Context

Fixes issue with updating field value in an issue, in a case when multiple fields of the same name exist, but are not present in this issue.

Types of changes

Checklist