Listing "Connected JIRA issues" from Insight in Confluence with iql

mazinger September 19, 2019

Hello,

We have Insight 6.3.6 with JIRA 7.13.x and Confluence 6.13.x.
In one new project where we have integrated objects from Insight in JIRA through a custom field, we want to put in a Confluence page an iql query which can list all "Connected JIRA Issues" from all our Insight objects of one objectType.

I have found that a query like this can tell us which are the insight objects with an open issue:

objectType == "ExampleSomeObjects" and object having connectedTickets()

But can't find the way of listing all the "connected JIRA issues" of all these objects through a iql query in Confluence.

Is it possible?


Thanks in any case.

3 answers

1 vote
tokcum
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2021

Hi,

although this is a quite old thread, I would like to propose a solution. As @mazinger described he is looking for all issues which are linked to objects of a specific object type. The result should be presented in a Confluence page.

As mazinger is looking for issues, we have to use JQL in the first place and not IQL. With IQL we can only look for Insight objects. However, we need IQL to describe the objects we are looking for.

To work on a concrete example: in Jira we have an issue type Change and a custom field called "Configuration Items" which is of type Insight object. This field is configured to link to assets from a CMDB implemented in Insight. There are many object types such as Server, Client, Network or even Business Service in the CMDB. All those object types are considered to be CIs (Configuration Items).

Now we would like to list all unresolved Changes sorted by create date from latest to oldest which are linked to objects of object type "Server" and show that as a table in Confluence.

Here are the steps:

1. Install the Insight macro in Confluence (probably done already).

2. Find all objects we are interested in Insight by working on a IQL. We do not have to care about connected tickets in this step.

=> objectType = "Server"

3. Find all issues we would like to present by working on a JQL.

=> issueType = Change AND resolution IS EMPTY ORDER BY created DESC

4. Combine JQL with IQL through iqlFunction

issueType = Change AND "Configuration Items" IN iqlFunction("objectType = \"Server\"") AND resolution IS EMPTY ORDER BY created DESC

 

Cheers,

Tobias

 

P.S. I put the object type name in quotes and escaped them. This is not strictly necessary in this example because there is no space in this object type name. However, there could be spaces in the name so it is an example how to handle spaces as well.

1 vote
Stephen Letch September 28, 2020

You probably don't even need the objecttype IQL. Try

 

object having connectedTickets(SomeJQLHere)

Noor Christensen April 1, 2021

This works perfectly, thank you. Example:

object having connectedTickets(project = TEST)
Like Yuguang Hu likes this
0 votes
Cristian Rosas [Tecnofor]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2019
mazinger September 19, 2019

Hi Cristian,

 

To be honest, I don't know how to do it. I can't find the Insight attribute which contains the "connected JIRA issues" in my objects. I don't know how to recreate this. And so I don't know how to put it in a Confluence page.

I've seen the link you posted, but don't understand how to use these functions.

I upload an image with the place where these "connected Issue" are.

Thanks,

issue.jpg

Cristian Rosas [Tecnofor]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2019

You have IQL and JQL.

An issue is connected to an object when a custom field in that issue has a object value (well, more exactly the label attribute).

What I did recommend is to use a macro to show Jira Issues based on JQL, and use the IQL function in the query as their documentation specifies

Suggest an answer

Log in or Sign up to answer