Import Environment Field on eazyBI

Hello! I am attempting to import the out-of-the-box field “Environment” from Jira using the javascript block below:

#Import environment field
[jira.customfield_environment]
name = “Environment”
data_type = “string”
limit = 4000
dimension = true
javascript_code = ‘’’
issue.fields.customfield_environment= issue.environment;
‘’’
My import runs, but the value shows up as “None” when I pull reports even though the environment field is populated within my tickets.

Thank you! any guidance is appreciated

Hi There,

If you are referring to this field in Jira Cloud:

Javascript:
[jira.customfield_env]
name = “Environment”
data_type = “text”
json_fields = [‘environment’]
javascript_code = ‘’’
if (issue.fields.environment) {
issue.fields.customfield_env= issue.fields.environment;
}
‘’’

Result:

For Server/Data Center, you can find the solution here: Jira calculated and scripted custom fields - eazyBI for Jira

Regards,

Eli Solutions

2 Likes

Thank you for your support on this!

@tzengtif No problem.