Sum of bugs in parent AND child objects

I have an assets custom field which includes two objects: “services” and “components”. (This is not the in-built Jira component but our own assets object)
Components are child objects of services. They include all the attributes of the service and one additional attribute ‘parent service’
When users raise bug tickets, they select the service/component via the custom field. Usually they will select the component. Sometimes, though, the component is not known and so the bug is raised at the service level.

So it might look something like this:

  • Alerts service - 2 bugs
    • Alert component A - 3 bugs
    • Alert component B - 4 bugs

My problem is how to report the sum of bug tickets at the service level - aggregating ‘component’ bugs AND adding any parent ‘service’ level bugs. (A custom hierarchy on parent service would be fine if all bugs were posted at the component level but they are not and therefore I’d like to find another way to show this data).

Hi @Paul44

A couple of questions here:

  1. Are you importing additional Assets data in your Jira Issues cube or is this an Assets source with “Import object connected Jira issues” selected? In Issues cube, unfortunately I don’t see a way to connect the Service and Components objects, however, there is a possibility to build something in the Assets cube.
  2. In Assets, what is the direction of the reference between Service and Component objects? Is Component showing up as an inbound reference or is it an outbound one? (you can check the direction of the arrow in the graph).

Thanks!
Nauris

Thanks Nauris,
My preference is to work on the issues cube with additional assets data. In hindsight, I think it was a bad design decision by me to add the two objects in a single field. I should have kept the objects separate.

I have also created Assets cube and in that cube components have an outbound reference to services (and so services have an inbound reference from components).

Thanks for taking a look at this

Regards

Paul

Hi @Paul44

Sorry for the long wait, finally got around to build this out in my own instance.

How is the custom field set up for the Issues section? Is the AQL filter bringing in both object types into one single-select field or do you have them set up as two separate custom fields?

If everything is in one single-select field then, when importing a Jira source, you can select the field from the “Add-ons” section in the import options to be imported as well and then define a new calculated member in this dimension so that the values are aggregated:

“Alert One”:

Aggregate(
  {
    [Alert Service].[Service One],
    [Alert Service].[Component 11],
    [Alert Service].[Component 12]
  }
)

Again, apologies for the long wait! Let me know how is the object selection set up in your Jira!
​Best regards,
​Nauris

Thanks @nauris.malitis. I really appreciate the time you put into this.
Our set up is with the two objects in a single field so the solution you suggest above works.

However, we have a large and changing number of services and components so a calculated member based on aggregating individual elements manually would be tough to maintain. I considered trying something to enforce a naming convention then somehow match on that (using Aggregate with Filter but it all feels a bit fragile.

There are some parent/child objects in our assets db where we really don’t want separate Jira fields and the number of object members is limited so I can employ this solution there.

Cheers

Paul

Hi @Paul44

I tinkered around a bit and may have found a workaround (but it’s a bit janky).

When importing Assets data into the Jira data cube, it is possible to import Object attributes as properties: Assets custom fields for issues

This requires adding code to the Advanced settings like this:

[jira.customfield_16608]
assets_object_attributes = [
  {name = "Service", data_type = "string"}
]

Your attribute name will most likely be a different one. And for the ID customfield_NNNNN - you can find it in the Import options → Add-ons tab → Assets section and hover over the custom field name.

We can use this to build a custom hierarchy from this imported property.

However, for this to work, both the parent and the child objects should have the same attribute with the same name. In the case of the parent issue, it would mean an “Object” type attribute pointing at itself:
Parent attributes:


Child attributes:

For each of the parents, you would need to set the value of this field to itself.

If you have this set up, and you have the code in the Advanced settings, then, after an import, you will be able to create a new hierarchy in this Object dimension:

This will allow you to build a report like this:

I’m no Assets expert, so maybe this self-link with the value set to itself is completely unacceptable in the Assets world, but I just figured that this could be a possible way how to get them in a hierarchy without manually defining members in eazyBI :slight_smile:

Best regards,
Nauris