Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I represent the number of objects in an object type as an attribute in a different schema

David Hart
Contributor
November 7, 2024

My thought process is create an automation rule that when an object is created in schema A, then object in schema B would be edited to change an attribute (in this case number of users) to show the number of objects in the object type from schema A.

Use case: We track our software by object type, each object is a license in that software tied to a user. So number of objects = number of users in that software. (Schema A)
We have another schema that tracks the software itself. We have information on the vendor, who admins the software, etc. (Schema B). I have added an attribute "Number of Users" to schema B and would like to show the number of objects in the corresponding object type from Schema A. 

I provided a screenshot of my broken automation. Any info would be awesome! Thanks!!!


bdgBQ60ZW3.png

2 answers

0 votes
David Hart
Contributor
November 13, 2024

@Harrison Ponce
I figured out my issue! I needed to correct my look up objects step.

objectType = "your objectType"

Now when an object is created in one schema, within a certain object type. An attribute is updated showing the number of objects from that original schema in an entirely separate schema! However, now it is only showing 100 when I clearly have more than 100 objects within the schema. Suppose that is just a jira limitation though.

Harrison Ponce
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.
November 13, 2024

Could be! This is still a fun puzzle I'm trying to solve (because I like to torture myself like that lol)

I did see something about using ".size" at the end of lookupObjects to return a value. (See bottom of this page). I had wondered if something like lookupObjects.size would work if you had a really killer AQL for your lookup objects?

0 votes
Harrison Ponce
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.
November 7, 2024

Hi @David Hart ! This is such an interesting use-case!

I do wonder if you need the count to be reportable in an attribute specifically? Or if just a count somewhere else would work?

I have an alternative to suggest, which may or may not work for you. We do something similar where we have Software objects and License objects. The license object has an object type attribute that ties back to the software, so when you're adding a license, it lets you select which software it belongs to. Then on the software itself, looking at the object relationships, I can see the count pretty easily without having to do some backend automations all the time. Would something like the screenshots below work?

assets1.png

assets2.png

David Hart
Contributor
November 7, 2024

Hi @Harrison Ponce This does work! However my ultimate goal is to provide this info to people who will view it through a confluence page (since they do not have access to our schemas). So It would have to come up as a column. Thus my creation of the attribute. Thank you so much for your suggestion though.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events