Solution: How to extract FixVersion from JIRA getIssueDetails Task

If you use the JiraTask in XLR to get JIRA details from here, and need access to the fixVersion field from JIRA or any other field:

You get back a String, which contains a JSON object as String, and this needs to be converted to a Jython Map to get accessors to the fixVersion name field as follows:

#‘JiraDetails’ Release Variable contains the details of the Issue from the JIRA getDetails Task in Release
#‘JiraBuildVersion’ is the variable which later contains the fixVersions content from JIRA (exactly the first one use, if list is needed, you need to change the code accordingly
import json
versionDict = json.loads(versionVar)
#this gets the first fixVersion, if there are more, you need to iterate and filter, the ‘not provided’ is coming
#back as default if not provided
releaseVariables[’'JiraBuildVersion ']= versionDict[0].get(‘name’, “notProvided”)