I'm trying to export nunit result to Jira Xray using XrayImportBuilder. I need to link a jira issue to another issue and I got below error. Am I missing something? XrayImportBuilder uses v2 create enpoints "rest/api/2/issue"
ERROR: Unable to confirm Result of the upload..... Upload Failed! Status:400 Response:{"error":"Error creating Test Execution - Issue create failed! - issuelinks: Field 'issuelinks' cannot be set. It is not on the appropriate screen, or unknown."
The code I used in jenkins pipeline:
step([$class: 'XrayImportBuilder',
endpointName: '/nunit/multipart',
importFilePath: 'nunit3.xml',
importToSameExecution: 'true',
projectKey: 'AT',
serverInstance: jiraServerId,
importInParallel: 'true',
inputInfoSwitcher: 'fileContent',
importInfo: """{
"fields":{
"project":{
"key":"AT"
},
"summary":"${summary}",
"issuetype":{
"name":"Test Execution"
}
},
"update":{
"issuelinks": [{
"add": {
"values": [
{
"type": {
"id": "10102"
},
"outwardIssues": [
{
"key": "AT-23"
}
]
}
]
}
}
]
}
}"""
])
I tried to run without update fields it worked but I ran with update-issuelinks field it failed.
In the documentation it says > importInfo and testImportInfo must comply with the same format as the Jira issue create/update REST API format.
But it doesn't work as it is expected in the API doc.