Currently, there is limited support when you would like to combine two cubes. We have some ideas to expand this and support additional attributes import to Insight custom fields in Jira issue cube. However, your use case covers a bit different scenario.
If you would like to analyze logged time and calculate total costs there, you would like to import Cost per hour mapped to Logged by user. The only reference between those two is Jira user attribute for Vendor object.
I would suggest using additional data import with Insight REST API and map Cost per Hour to Logged by users and use Vendor attribute with type Jira user for mapping column.
You would like to check some technical details from Insight to access correct data values:
Insight Schema ID
Insight object type ID for Vendor object in this schema
Then for this Vendor object type, check out attribute ID for Jira user and Cst per hour.
You can open Insight object Vendor tab Attributes to get this information:
Here are steps how you can get this working in eazyBI:
- Create a new source data REST API data import in the account:
1.1. set the Source data URL
{JIRA_HOME}/rest/insight/1.0/iql/objects?objectSchemaId={ID}&iql=objecttypeId={ID}
fill in JIRA HOME URL and ID for Schema and Object type in the URL above
Here is an example for me:
1.2. add the authentication options
1.3. if you have a lot of Vendor objects you can set pagination parameters as well.
see more about REST API import options if needed.
1.4. Add the data Path parameter to access Object entries in Content parameters:
$.objectEntries
1.5. You would like to add Custom JavaScript code to access attributes for those vendor objects, update the attribute IDs in the code below:
attributes = doc.attributes;
for (var i = 0; i < attributes.length; i++) {
var attribute = attributes[i];
switch (attribute.objectTypeAttributeId) {
case 4215: // attribute ID for user
doc.user = attribute.objectAttributeValues[0].user.name ;
break;
case 4269: // attribute ID for Cost per hour
doc.costPerHour = attribute.objectAttributeValues[0].value ;
break;
}
}
- Then you would like to continue with mapping. Add the mapping for those two custom columns (they should be the last ones in the mapping screen):
Select Issues cube name in the top left corner. Then search for columns User and CostPerHour and set the mapping:
User: dimension: Logged by, level: User, and select additional options: Key column, Skip missing
CostPerHour: Logged by, level: User, and set the property name in additional options: Cost per hour
You can select an option Hide unmapped columns after this:
-
Run an import. After import, you will have a new User defined>custom property>Logged by Cost per hour
-
Define a new calculated measure for Cost calculation:
.
NonZero(SUM(Filter(
Descendants([Logged by].CurrentMember, [Logged by].[User]),
[Measures].[Hours spent] > 0),
[Measures].[Logged by Cost per hour] *
[Measures].[Hours spent]
))
Here is my report example for this:
Daina / support@eazybi.com