I am using the JiraPS Module in Powershell. Pseudo Code below:
Get credentials
New-JiraSession
Populate required fields
$field = @{
Components = @(@{name = 'Team' })
customfield_10450 = @{id = '557058:f7' }
customfield_10333 = @{name = 'IT xxx' }
customfield_10361 = @{name = 'REQUESTS' }
reporter = @{id = '557058:f7' }
}
$params = @{
Project = $project
IssueType = $issueType
Summary = $summary
Description = $description
Labels = $labels
Fields = $field
Credential = $credential
errorAction = "stop"
}
if ($field) {
$params.Fields = $field
}
#
try {
Write-Output "Issue can be created:`n$_"
New-JiraIssue @Params
Write-Output "Issue was created:`n$_"
} catch {
Write-Output "Issue cannot be created:`n$_"
}
I get the following Error:
PS>TerminatingError(New-JiraIssue): "Jira's metadata for project [ITDBABI] and issue type [Task] specifies that a field is required that was not provided (name=[Reporter], id=[reporter]). Use Get-JiraIssueCreateMetadata for more information."
Issue cannot be created:
Jira's metadata for project [ITDBABI] and issue type [Task] specifies that a field is required that was not provided (name=[Reporter], id=[reporter]). Use Get-JiraIssueCreateMetadata for more information.
Any Help would be greatly appreciated.