As tracked at JSDCLOUD-4317, Jira Service Management's CSAT survey comments are not searchable via JQL. This article introduces a workaround to make them accessible via a custom field.
Skip ahead to section (1) if you are not interested in the peripheral context.
You can browse the available Smart Values at the issue URL like https://SAMPLE.atlassian.net/rest/api/2/issue/EX-5?expand=names; however, there's no field holding the survey comment value. Refer to Find the smart value for a field for more details.
Although this article introduces an approach with REST APIs, it's error-prone due to some constraints. So please make a careful decision whether to implement the rule considering the benefits vs. cost of operations.
First things first, you always need to have credentials when you do something important:
$ echo -n "site-admin@example.com:123e4567-e89b-12d3-a456-426614174000" | base64
c2l0ZS1hZG1pbkBleGFtcGxlLmNvbToxMjNlNDU2Ny1lODliLTEyZDMtYTQ1Ni00MjY2MTQxNzQw
MDA=
Make sure to have a custom field to save the values. For example:
Here's the overview:
Headers:
When a customer selects the satisfaction rate in the email, the rule will be triggered because the "satisfaction date" is changed. Then the web request receives a 404 error due to the lack of comment. Feel free to add a comment if you find any solution for this symptom.
Besides, the edit issue action can cause the following error:
Found multiple fields with the same name and type
In that case, you can go with the additional fields like below:
{ "fields": { "customfield_10003": "{{satisfactionComment}}"} }
Refer to Advanced field editing using JSON for more details.
K_ Yamamoto
Technical Support Engineer
Atlassian, K.K.
Yokohama, Japan
10 accepted answers
3 comments