According to the documentation it would be set as:
Set-JiraIssue -Issue $ticket.Key -Fields @{ Organizations = @( @{ id = 27 } ) }
But that fails with:
Invoke-JiraMethod: E:\Users\%username%\Documents\PowerShell\Modules\JiraPS\2.14.6\JiraPS.psm1:5505
Line |
5505 | Invoke-JiraMethod @parameter
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| customfield_11302 ----------------- Operation value must be a number at array index 0
After digging a bit in the Atlassian documentation and issues I found: https://jira.atlassian.com/browse/JSDSERVER-4353
Which would result in: Set-JiraIssue -Issue $ticket.Key -Fields @{ Organizations = @(27) }
Context
Please add documentation on how to set the JiraSD Orgaanization field. Apparently it uses a different syntax than other customfields...
https://atlassianps.org/docs/JiraPS/about/custom-fields.html#custom-fields
Description
The JiraSD Organisation gets returned as (Get-JiraIssue)
Get-JiraField "customfield_11302":
According to the documentation it would be set as:
Set-JiraIssue -Issue $ticket.Key -Fields @{ Organizations = @( @{ id = 27 } ) }
But that fails with:
Oddly
(Get-JiraField "customfield_11302").AllowedValues
doesn't return anything.After digging a bit in the Atlassian documentation and issues I found: https://jira.atlassian.com/browse/JSDSERVER-4353 Which would result in:
Set-JiraIssue -Issue $ticket.Key -Fields @{ Organizations = @(27) }
And that works.