Forums

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

Asset field AQL currentReporter in Goups attribute

Rik de Valk
Community Champion
February 26, 2024

Hi Community! 

I need your help on a Asset Custom Field AQL for filtering the issue scope. 

In the Object Schema "CMDB", we have an ObjectType "Service Offering" that has an attribute 'Subscribers'.

The Subscribers attribute is of the attribute type Group and can contain multiple Groups. 

We have a Custom Field of the type Assets called 'Affected service offering'. This currently only filters on:

objectType = "Service Offering". 

Requirement: Now, we want to ensure that users can only report issues on the portal for Service Offerings to which they are Subscribers based on their group membership. 

For example: the Service Offering 'Microsoft Teams' has the 'jira-servicedesk-customers' group as Subscribers so that all staff can report incidents for that. But the Service Offering 'Azure Virtual Machine' only has some groups as Subscribers that work in DevOps teams or other technical user groups. 

I can see that we should be able to filter (Issue scope) on 

Subscribers having user("currentReporter()")

But that only seems to work for single Group values (cardinality). I guess we would have to be able to compare currentReporter().groups with Subscriber groups to see if there is an overlap. 

Any idea how to make this work when the attribute cardinality is set to multiple? 

 

Thanks! Rik 

 

1 answer

1 accepted

1 vote
Answer accepted
Rik de Valk
Community Champion
February 26, 2024

It really is Monday... As it turns out, using the

Subscribers having user("currentReporter()")

works just fine. 

I simply doesn't work if you have a typo in your AQL ðŸ˜Š

So... Anyone wanting to implement a similar scenario: the above solution works.... Also if you have multiple Groups as the attribute type.  

So this way you can restrict Asset fields on object level. Yeah, row-based-security! 

I hope your Monday was better than mine.... 

Suggest an answer

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

Atlassian Community Events