Imported multi-value dimension

Hi everyone,
I have to filter issues based on a link “realized by” to special release issues (a,b,c). Because I have to deal with a huge Jira database and have had problems with timeouts in EazyBI when importing the linked issues using Issue links and then filtering using MDX, I am trying to preprocess the issues linked by “realized by” at import time using Javascript. The Javascript code yields a list of issue keys as strings for the dimension [realized by links]. I was hoping that I could then select issues that have (among others) a “realized by” link to issue “a” using [realized by links].[a]. However, this only yields issues which have exactly one [realized by] link to issue [a] but not issues having [realized by] links to both an and b. To refer to those issues I have to specify [realized by links].[a,b] . Is there any better way to approach this so that I get a good performance when selecting issues linked to a certain release issue?

The import code:

[jira.customfield_realized_by_links]
name = “realized by links”
data_type=“string”

multiple_values = true
dimension=true
javascript_code=‘’’
var result= [];
if (issue.fields.issuelinks) {
for (i=0;i<issue.fields.issuelinks.length;i++) {
var link=issue.fields.issuelinks[I];
if (link.type.inward==“is realized by” && link.inwardIssue) {
if (link.inwardIssue.fields.issuetype.name==“release”) {
result.push(link.inwardIssue.key);
}
}
}
}
issue.fields.customfield_integrated_by_links=result;
‘’’

Thanks and best regards!

Hi @bbking ,
Your dimension will hold multiple values; thus you should have this line using join and applying the value to correct custom field - issue.fields.customfield_realized_by_links=result.join(",");

The code should look like this:

[jira.customfield_realized_by_links]
name = "is caused by"
data_type="string"
multiple_values = true
dimension=true
javascript_code='''
var result= [];
if (issue.fields.issuelinks) {
  for (i=0;i<issue.fields.issuelinks.length;i++) {
    var link=issue.fields.issuelinks[i];
    if (link.type.inward=="is caused by" && link.inwardIssue) {
      if (link.inwardIssue.fields.issuetype.name=="Story") {
        result.push(link.inwardIssue.key);
      }
    }
  }
}
issue.fields.customfield_realized_by_links=result.join(",");
'''

best,
Gerda // support@eazybi.com

Hi Gerda,
thanks for your answer!
I tried the solution with joining the results before. Unfortunately when doing this and then selecting on individual values using MATCH in mdx formulas, I get a lot of timeouts because I have to deal with a big JIRA database (the same happens when directly importing this as a link dimension). Therefore I was hoping that when I have multiple values in my dimension I select them by choosing a member of the dimension. For example, when an imported issue refers to issues with key IssueKey-1, IssueKey2, IssueKey3 in the “is caused by” dimension I can select this issue when filtering for [is caused by].[IssueKey2] along with all other issues that have IssueKey2 in the dimension (fix version for example works like this). If I concatenate all the issue keys using join I would have to enumerate all the possible combinations of dimension values that include “IssueKey-2”.

Thanks again and best regards!