Define custom field and add to dimension in Advanced Settings

Hi - I’m trying to define a custom field, and then use the custom field to add items to a second custom field imported as a dimension. However, the first custom field doesn’t seem to exist when I get to my second custom field as dimension code.

I want to do something like this:
–Add epic links to children
[jira.customfield_epic_issuelinks]
name = “Epic Links”
data_type = “string”
dimension = true
update_from_issue_key = “epic_key”
javascript_code = ‘’’
if(issue.fields.issuelinks) {
issue.fields.customfield_epic_issuelinks = issue.fields.issuelinks;
}
‘’’
Then based on the issue link, add the issue to another custom field/dimension, like this:

[jira.customfield_flowmetricscategory]
name = “Flow Metrics Category”
data_type = “string”
dimension=true
javascript_code = ‘’’
if issue.fields.issuelinks[i].startswith[“xxx”] OR issue.fields.customfield_epic_issuelinks[i].startswith[“xxx”]
{
issue.fields.customfield_flowmetricscategory = “XXX”
}
‘’’
(i hacked the copy/paste so syntax may be incorrect)
Is this possible?

@JCJC

issue.fields.issuelinks can not be imported as dimension with “string” type as itis an array in the issue JSON structure.
See some examples on how to import issue links:

But here I would ask you to share more details about the expected report - how exactly are you planning to use “Flow Metrics Category” dimension in your report?
How would your final report look like?
Perhaps you can share some mockup with the expected report.

Martins / eazyBI