Editing a dimension created in advanced settings

Hi there - I have a custom field that was created through the advanced settings where I create a dimension called “team” and assign a name to each of my projects. My issue is that when I update the code to add an additional board I don’t see the changes reflected in my dashboards (eg. the team that I added does not exist there). See below: I have changed the names of the boards to reflect what I am trying to do. The bolded text is what I am trying to add.

creates team as dimension (filter by team)

[jira.customfield_teamname]
name = “Team”
data_type = “string”
dimension = true
json_fields = [“Project”, “customfield_10029”]
javascript_code = ‘’’
if (issue.fields.project.name == “P”) {
issue.fields.customfield_teamname = “S”;
} else if (issue.fields.project.name == “D”) {
issue.fields.customfield_teamname = “P”;
} else if (issue.fields.project.name == “DR”) {
issue.fields.customfield_teamname = “C”;
} else if (issue.fields.project.name == “W” && (issue.fields.customfield_10029 && issue.fields.customfield_10029.value == “E”)) {
issue.fields.customfield_teamname = “E”;
} else if (issue.fields.project.name == “W” && (issue.fields.customfield_10029 && issue.fields.customfield_10029.value == “G”)) {
issue.fields.customfield_teamname = “G”;
} else if (issue.fields.project.name == “W” && (issue.fields.customfield_10029 && issue.fields.customfield_10029.value == “O”)) {
issue.fields.customfield_teamname = “O”;
} else if (issue.fields.project.name == “M” || (issue.fields.project.name == “W” && (issue.fields.customfield_10029 && issue.fields.customfield_10029.value == “K”))) {
issue.fields.customfield_teamname = “K”;
} else if (issue.fields.project.name == “TEST BOARD”) {
issue.fields.customfield_teamname = “TEST”;

} else {
issue.fields.customfield_teamname = “(none)”;
}
return issue.fields.customfield_teamname;
‘’’

Hi,

The first recommendation is not to use the return statement if you define a Javascript-calculated custom field with the advanced settings. That may have impact on other Javascript calculations during the data import.

A likely reason why the adjusted Javascript had no effect is that a full data reimport is needed once you do any changes to the advanced settings of the custom field. Note that during the regular data import, only the changed issues are re-imported, so none of the changed issues might go through the new condition.

Please, contact support via email, if the full re-import does no fix the problem. We will need more details for further debugging.

Kindly,
Janis, eazyBI support