Hello everyone. I want to store my JSON data in Jira and after that use this data in Groovy scripts. Or simply create built-in variable in Jira and use this variable in Groovy script. How to implement this situation? (or use other methods). I known about Bamboo , but I want to use other methods
Hello @Andrew Striletskyi
You can store json on file system under jira_home directory and get it like this
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.config.util.JiraHome
import groovy.json.JsonSlurper
String s = ComponentAccessor.getComponentOfType(JiraHome.class).getHome()
def jsonfile = new File(s+"/scripts/data/youejson.json")
def json = new JsonSlurper().parseText(jsonfile.text)
Map jsonRes = (Map) json
Map vendors = (Map) jsonRes.get('keyelement')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.