Hi Community,
question related to JQL issue search in combination with an Asset object and their attributes. I am wondering if the following use-case is possible to do with JQL in the JSM cloud.
Our issues are always connected to an "Customer" Asset object (Customer is visible as a field on the issue). This customer Asset object has the "Key Account Manager" as an attribute.
Now I would like to see all issues for a specific "Key account Manager" within an JQL.
I can find the key account manager field in JQL search, but when I set a valid name then no issues can be found.
If I look for the customer object in JQL then the correct issues are displayed.
So my question is, how can I look for issue related to an attribute of a connected Asset object?
Like is it somehow possible or do I need to find another solution.
Plan B could be do copy the asset attribute value into a Jira custom field (I know that this would work).
Thanks in advance!
Cheers,
Simon
You can use AQLFunction in JQL to fetch the issues.
Example: here customField is Assets object custom field in Jira and Account Manager is the attribute of Customer object.
customField in aqlFunction("Customer.\"Account Manager\" = \"Mathias Edblom\"")
Refer to the below article
https://support.atlassian.com/jira-service-management-cloud/docs/assets-jql-functions/
I have seen this article and the example, but which value do I need to use for the "customField" for my situation?
I have tried some variants, but I never got any issues displayed...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here custom field refers to the custom field which you must have created in Jira to show the assets values in issues view or edit or create screen
In your case I think you have mentioned as "Customer is visible as a field on the issue" so you need to use that field name.
Regards
Uday Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Uday Kiran Bhaviri
I did that, but I still do not get any issues as a result of the query. There is no error displayed either, so I probably it just does not find any issues with constructing a query for this use case.
Perhaps you see in the following example what I am doing wrong or if it is perhaps not possible what I am trying to do.
So I have the following query where I want to display all the issues of customers with Gabriella as the Key account manager:
customer in aqlFunction("Customer.\"Key Account Manager\" = \"NameXYZ\"")
There are multiple customers for which Gabriella is the Key account manager and all these issues should be displayed. There are plenty of closed and open issues connected to this customer. Issues are always connected to the customer, but not directly to the Key account manager.
Customer example:
Do you see why the query displays nothing with this query?
Is there a better way of getting all the issues depended on a specific customer attribute?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Simon Sahli
Is Customer - your custom field name in Jira, Could you also show me the customfield context configuration
Also can you check the JQL like
Customer = "'some thing"
Just to check whether the configurations are working.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
see the following customer Asset field definition:
And yes you can use JQL for the customer field. Example with looking for a specific customer:
Anything you can conclude from this situation?
Thanks!
Best,
Simon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Simon Sahli
Add the other attributes other than label in your case 'Key Account Manager' in the configuration in
Allow search filtering by these attributes
Let's see if it works
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Uday Kiran Bhaviri
thanks for the suggestion. I have added the "Key Account Manager" field to be allowed to search (see printscreen).
I have then run the following AQL query again, but there was still no issue shown as a result:
customer in aqlFunction("Customer.\"Key Account Manager\" = \"NameXYZ\"")
Any other suggestions?
What I find a bit weird is that "Label" has been configured here. Like Label is only used on the issue level, but not in Assets, right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you are missing something, if you have support from Atlassian please create a request and check with them. Hope you have all permissions to view all the objects and the referenced objects.
Write AQL to get the customers whose key account manager is "something"
objectType="Customer" and "Key Account Manager" = "something"
And in JQL
Customer = "'some thing"
open the issue and check the Customer asset is showing other attribute values in view screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got a response from the Atlassian Support now and they could help me solve my request.
This is the AQL I needed for my use-case:
Customer in aqlFunction("\"Key Account Manager\".Name = \"NameXYZ\"")
Basically I needed to use "Name" for the attribute, which is used in the "Employee" object for the name of the employee and to which object the Key Account Manager is referenced to.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Simon,
This should be possible with the AQL JQL fonction
See related documentation : https://support.atlassian.com/jira-service-management-cloud/docs/assets-jql-functions/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.