Hello all,
Still kind of new with creating JIRA automations. I've currently run into an issue with one that is supposed to retrieve the top three recommended knowledge base articles for an issue and send an email to the respective reporter containing those articles. Instead, it will only send one article even though there are at least three that contain the same keywords as the issue summary. Here is an overview of the rule as I am testing it (manual trigger will be changed to automatic)
I believe the issue may reside in the formatting of the Web Request URL or in the formatting when sending the email. Here is the current web request url: https://richmondnational.atlassian.net/rest/servicedeskapi/knowledgebase/article?query={{issue.summary.urlencode()}}&limit=3
The rest of the web request is formatted accordingly:
Here is the email formatting:
Troubleshooting steps I've already taken:
- Ensured all knowledge base articles are accessible and not locked behind permissions
- Recreated the auth token
I should also mention that I created this automation based off this post here: https://community.atlassian.com/forums/Automation-questions/Suggested-knowledge-base-article-smart-value/qaq-p/1572379
Hi @Isaac Ruffner -- Welcome to the Atlassian Community!
If you use your request URL with an example query in a browser tab (or standalone tool), do you get the expected 3 results?
If you write the webhook response to the audit log, do you observe the same results as the standalone call?
Finally, that result of that endpoint call should be a list of values. If you write this to the audit log, does it show as a count of 0 to 3, confirming the JSON is interpreted as a list:
Returned article count: {{webhookResponse.body.values.size}}
Kind regards,
Bill
Hi Bill,
Thank you, and apologies for the late response, I was out of town. I've tested the web request URL using a third-party tool, Postman. It seems for that the endpoint call, I'm getting mixed results depending on what I set the {{issue.summary.urlencode()}} query parameter to. In this instance, I've created a JIRA Service Request titled "VPN not working". I've then set the {{issue.summary.urlencode()}} query parameter to a few different values to see what it returns. When set to the exact title of the request, VPN not working, I get the following response
However, when I set the parameter to just VPN or VPN not, I receive the results I'm expecting, So now I'm suspecting that there is something wrong with how the web request is capturing the keywords from the service request. Weirdly enough, the service request itself shows recommendations from the knowledge base accurately,
I'm wondering if there is some way to make the keyword capture less restrictive?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found this recent, open defect where the endpoint is not returning the expected KB article results: https://jira.atlassian.com/browse/JSDCLOUD-15884
It appears to be in the short-term backlog evaluation status, so I recommend watching / voting for that one.
And in the endpoint documentation, I do not see a way to make the query "fuzzier" and less restrictive: https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-knowledgebase/#api-rest-servicedeskapi-knowledgebase-article-get
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah ok yes that makes a lot of sense as I remember a time when this automation was functioning properly. I will be paying close attention to that defect post and hope it gets fixed soon. Thank you for your help!
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.