How could I mix data from Jira and Insight?

Hi,

We have a jira instance where my team and also our external vendors log time for every issue.
We also have an Insight repository with:

  • an object called User from our AD which links jira username to vendor

  • an object called Vendor with an attribute called “Cost Per Hour” and an attribute called Security group which is connected to a jira group for each vendor

  • we could also have a custom field “vendor” in the jira user based on its AD profile (we already have the “reports to” field)

We want to get a report in EazyBi where we get the cost of an issue based on the hours logged by user multiplied for the cost per hour specified on its insight object, and them sum it up for the epics or projects.

Is it possible? Can we mix both cubes? if so, how?

Thanks in advance!

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:

  1. 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;
   }
}
  1. 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:

  1. Run an import. After import, you will have a new User defined>custom property>Logged by Cost per hour

  2. 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

Thanks Daina,

Got it working as per your comment, however I’ve had to add a new object called User as my object is called vendor and the only link between the loggedby user and the vendor is a group the user belongs to.

Anyway, got it working, many thanks!!

The pagination parameters for this REST API endpoint: