Grouping of components from multi projects

I’m trying to set up a number of reports based on Components (part of Project dimension).
The problem I encounter is that the same component name is used in several projects that are imported to easyBI. To get the report complete I need to select every component with the same name.
Could this be handled in the import to easyBI from JIRA or how can I solve this so I have unique name of components to select from (or show in the table)?

1 Like

Hi,

Project dimension groups components under each project, and, currently, this is the only way how components are grouped in Projects dimension.

There are two ways how to get the same name components displayed as one row in the report table.

  1. If you have a few components and this list is quite static.

Then you may want to create calculated members in the Project dimension for each component, where you aggregate all the same name components. Example of the formula for aggregating components “Web” from all projects.

    Aggregate(Filter(
    [Project].[Component].Members, 
    [Project].CurrentMember.name MATCHES 'Web'
    )) 

The calculation is case sensitive!
Then use all those calculated members in the report rows.

  1. If you have a lot of components and they could be added rapidly

Then the best would be creating a new Components dimension calculated during data import: for that, use JavaScript calculated custom field.

First, define the custom field settings together with the JavaScript code in eazyBI advanced settings:

[jira.customfield_components]
name = “Components”
data_type =“string”
dimension = true
multiple_values = true
split_by = “,”
javascript_code='''
var components=issue.fields.components;
var result=[];
if (components) {
 for (var i=0;i<components.length;i++) {
   result.push(components[i].name);
 }
 issue.fields.customfield_components=result.join(“,”);
}
'''

Then, in the eazyBI import options custom field list, find the field “Components” and select it to be imported as a dimension. Perform data import.

Finally, in the Analyze tab, find this new Components dimension (under custom fields dimensions) and use in the report rows as any other dimension.

Ilze, support@eazybi.com

1 Like

To get this to work I need to remove the [Component] in the second argument - but then it works!
Aggregate(Filter(
[Project].[Component].Members,
[Project].CurrentMember.name MATCHES ‘Web’
))

To test the calculated custom field I need help since I don’t have the access.
I will however test this as well due the amount of components we’re having.

Thanks!

Hi, the dimension works perfect, but when i use my “Componentsgroup” field i am not able to drill through all components ?

Unbenannt

thanks for any idea, felix

Hi,

Thank you, you are correct, the calculated member contained redundant [Component], I fixed it in my post.

About the JavaScript custom field: it seems the component value is not retrieved. You may test for a couple of issues what value is calculated with this JavaScript code. You can test the code in the import options screen, tab “Additional options” as described here: https://docs.eazybi.com/display/EAZYBIJIRA/JavaScript+calculated+custom+fields#JavaScriptcalculatedcustomfields-DefinecalculatedcustomfieldineazyBIadvancedsettings

You may also contact support@eazybi.com if you need our help with that.

Ilze

Great ! This is the solution … regards from vienna…

Hi. We did it with number 2. (Using Javascript)
We want to see ‘Drill through issue’. But we can’t see it.
The contents of ‘Drill into~’ are only visible.

Is there any way to activate ‘Drill through issue’?