Hello,
I am trying to create a request form in Jira that includes dropdown fields for contracts. The values should be pulled directly from Jira’s CMDB (Assets), but filtered according to the organization the requester belongs to.
The goal is that when a client logs in and opens the form, they will only see their own contracts in the dropdown list, based on their organization.
I would greatly appreciate your support in configuring this functionality, and thank you in advance for your assistance.
Hi @j_jagielak
For community members to help out, they will need more information.
This should be based on the reporter
Schema is a Simple. Schema Name with object type Organization with an attribute name.
object type Agreement with attributes name, number, and organization with reference to Organization.
Custom field is only one, Agreement. without configuration
In this field, I need to see only Agreements that belong to the Organization
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @j_jagielak
Please show the configuration of your custom field?
Is this field of type Asset, this will be required to show asset related information
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.
Hi,
I have a few questions regarding AQL usage in Jira Service Management Cloud, especially in the context of Assets and request forms.
First, is it possible to identify the currently logged-in user in AQL? For example, can AQL dynamically resolve the current user when filtering data, such as: assignee = currentUser(). Does this work in Jira Cloud and are there any limitations compared to Jira Server or Data Center?
Finally, is it possible to filter Assets fields in a request form based on the organization or the currently logged-in user? For example, restricting the list of Assets shown on the request form to only those that are related to the user submitting the request or to the user’s organization, conceptually something like: User = currentUser() AND Organization = currentCustomerOrganization().
If this is not supported directly in Jira Service Management Cloud, what are the recommended workarounds or best practices? For example, using additional attributes in Assets, request participants, organization fields, or automation rules.
Any guidance, known limitations, or practical examples would be greatly appreciated.
Thanks in advance.
Best regards,
JJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @j_jagielak
An Assets custom field can only show information based on information in assets, if you want to use user or other information.
Then you will need to provide information in asset attributes.
You can't use JQL based on information in non asset fields in a clause within an assets field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, thanks for your reply.
I am currently using the following filter:
objectType = Umowy AND klient = currentUser()
which works as expected.
However, instead of filtering by currentUser(), I need to filter objects based on the organization assigned to the Jira account.
The organization name is stored as an attribute in Assets, and I need to join/match this attribute with the organization assigned to the user account in Jira Service Management (i.e. the user’s JSM Organization).
In other words, I need an AQL-compatible way to resolve the user’s organization and compare it with the organization attribute stored in Assets objects. still fighting with no results. Trying this organisation() ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @j_jagielak
This will no work as you can't use organisation(), as this doesn't exist in JQL.
And this is not possible, as the only JQL clause that is available from organisation is;
a user field with clause in organizationMembers("<list organization or organizations split by comma>")
So to do this, you could run an automation after work items creation, to store the Organization of the member in a variable, as this is a value on the work item after creation ( if the reporter is in an organization)
Then compare this variable with the attribute in the object in assets.
It's tricky and maintenance heavy.
But organization is by default stored in a JSM project and not in Assets
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.