I would like to search for all object of a specific objecttype, if they only have an inbound reference from another type with a specific name.
Basically I have all my servers linked to from an IT system object representing a domain.
They are also linked to from other systems.
I want to list all the server that are only linked to by that domain IT system.
Specifically I want to find all the server that are not linked to a system, except for the domain system.
Not knowing how your schema is defined makes it difficult to propose the correct solution, but here is a couple of options to try. It would be determinate on whether your server is linked to your domain IT system, or if your domain IT system is linked to your server. Direction matters with IQL. Or you can you use outbound references instead. But again, direction will matter with querying links.
This first IQL will return all objects that have an inbound reference from an object who has a name like "domainITSystemName". If you have multiple domain IT system objects, you will need to update this query with the name of each domain IT system object, so that you can find all the servers linked to each domain.
objects having inR(Name like "domainITSystemName")
This IQL will return all of your domain IT system objects that have an inbound reference. This query will be useful to see the number of inbound references are connected to your domain IT system object. IQL does not have a count function (that I have found).
objects having inR() AND objectType = "domainITSystem"
For more information, you can review the IQL documentation from Atlassian here: Advanced IQL Searching.
Thanks for trying, I realise without a deeper understanding of our schema it's hard.
Essentially it's
"IT System" ---> Server
Imagine an IT Systems called "OurDomain".
When I import servers, I link them from that ITSystem.
So I'm looking for server that are only linked from that ITSystem, as they probably need linking from another systems.
I thought this would work.
> objectType = Server and object NOT HAVING inboundReferences(objectType = "IT System" and Name NOT LIKE "OurDomain")
Servers that don't have links from Systems that are not OurDomain.
I don't think that works, I see a lot of results, need to dig in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.