I spent pretty much the entire day trying to get this to work, but the information I find is all over the place, and nothing seems to work.
What I want to achieve is quite simple:
- I have a custom field of the type Asset Object
- this field displays all kinds of assets from Jira Asset Management
- one of the attributes i have there is "ShowForOrganization", let's say it has values "CompanyA" or "CompanyB" which i enter as text.
When a user part of an Organization, reports a ticket, the Organization is shown (lets say "CompanyA".
In the Filter Scope (AQL) of the above named Asset field, I want to only show those objects for the Organization shown in the ticket.
So if I try this and manually enter a value in my AQL, it works fine:
Objecttype = Company AND ShowForOrganization = "CompanyA"
But actually getting the value out of the Organizations field proves to be a huge challenge so far, I tried everything I can think of, all kind of examples I found, but i can't get it to work.
I tried using:
currentUser.organizations.name
issue.fields."Organizations"
organizations
IN (${customfield_10002${0}})
Can someone 'show me the way' ? 