How do i get Collecting customer satisfaction (CSAT) feedback data using script runner

How do i get Collecting customer satisfaction (CSAT) feedback data using script runner.

I need to get the values of rating, comment and received date of issue so that i will copy them in different custom fields

Following is the reference link which i am talking about

https://confluence.atlassian.com/servicedeskserver036/collecting-customer-satisfaction-csat-feedback-921471876.html

1 answer

Hi Gopi,

So the satisfaction and the satisfaction date are custom fields therefore you can get their values in the same way you do with any other custom field. So for example the following 

def issue = ComponentAccessor.issueManager.getIssueByCurrentKey("TSD-1")
def satisfactionCF = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("Satisfaction")
def satisfactionDateCF = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("Satisfaction date")

def satisfaction = issue.getCustomFieldValue(satisfactionCF)
def satisfactionDate = issue.getCustomFieldValue(satisfactionDateCF) // this is a timestamp

log.debug "satisfaction rate for issue ${issue.key} is ${satisfaction?.rate} stars out of ${satisfaction?.scale} and date entered is $satisfactionDate"

will create a log entry 

satisfaction rate for issue TSD-1 is 3 stars out of 5 and date entered is 2017-11-10 17:58:20.018

I am not sure how you can get the comment yet, but I will try a couple of things and will let you know. 

Regards, Thanos

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,176 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot