Calculated member in Issue dimension

Hi everyone, I need to analyse issues that have a link to a capability. The link is already imported as a property ‘Child’. I tried the following:

Aggregate(
Filter(
DescendantsSet([Issue].CurrentHierarchyMember, [Issue].CurrentHierarchy.Levels(“Issue”)),

NOT IsEmpty(
[Issue].CurrentHierarchyMember.get(‘Child’)
) AND
[Measures].[Issues created]>0
)
)

While this yields the desired issues I get the following error when trying to measure “Issues created” for the entire set:

#ERR: mondrian.olap.fun.MondrianEvaluationException: Aggregation is not supported over a list with more than 1000 predicates (see property mondrian.rolap.maxConstraints)

The reason I want to filter out on the issue level is to later also use measures like “Issue history” and so on.Any better way to approach this?

Thanks and best Regards!

Hi,

The aggregated members in the Issue dimension (and other large-size dimensions) are resource-demanding and might reach system limitations.

A better way to filter issues is to implement another dimension for that. However, in your case, the Issue link dimension does not fit the filtering purpose because there is no “none” member (due to specific implementation considerations).

The workaround is to create another dimension with a Javascript calculated custom field. This dimension could have Yes/No values for filtering issues accordingly.

The advanced settings like this should do that:

[jira.customfield_has_parent_link]
name = "Has Parent Link"
data_type="string"
dimension=true
javascript_code='''
var result= "No";
if (issue.fields.issuelinks) {
  for (i=0;i<issue.fields.issuelinks.length;i++) {
    var link=issue.fields.issuelinks[i];
    if (link.type.outward=="is a child of" && link.outwardIssue) {
      if (link.outwardIssue.fields.issuetype.name=="Capability") {
        result="Yes";break;
      }
    }
  }
}
issue.fields.customfield_has_parent_link=result;
'''

The code should be adjusted according to your link configuration.
After the data import, a new dimension will be created, allowing the filtering by the presence of the link with Yes/NO choices.


Kindly,
Janis, eazyBI support

This worked perfectly and also served as an example for some other definitions. Thanks so much for this great support, Janis!

1 Like