I am trying to use Graphql to export test cases and their execution results for any test case in a specific Test Plan. I was able to write the Graphql script to get all the details from the test execution I need, but the one problem is that the defect value returned is a string of numbers rather than the actual defect key. I tried using jira fields in the code for "links" and "linked issues", but that didn't work. Does anyone know how to just get the specific defect key associated with the test case? Here is my code:
{
getTestExecutions(jql: "key = Demo-123", limit: 100 start:0) {
results{
jira(fields: ["key", "summary"])
testRuns(limit: 100 start: 0){
total
results{
test{
jira(fields: ["key", "summary", "description"])
}
status{
name
}
comment
defects
steps {
status{
name
}
action
result
actualResult
customFields {
value
}
defects
}
}
}
}
}
}