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
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
[x] My code follows the code style of this project.
[ ] I have added Pester Tests that describe what my changes should do.
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