• 138
    • 7
    • We collect Jira Service Desk feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      It is not possible to search the customer comment using JQL.

            [JSDSERVER-4317] Make Satisfaction comment searchable via JQL

            For anyone interested in reading and/or updating this information through the JAVA API, here is a POC:

             

            import com.atlassian.jira.bc.issue.properties.IssuePropertyService
            import com.atlassian.jira.component.ComponentAccessor
            import com.atlassian.jira.entity.property.EntityPropertyService
            import com.atlassian.jira.issue.Issue
            import com.atlassian.jira.issue.IssueManager
            import com.atlassian.jira.security.JiraAuthenticationContext
            import com.atlassian.jira.user.ApplicationUser
            import org.apache.log4j.Level
            import org.apache.log4j.Logger
            
            Logger log = Logger.getLogger("Cleanup")
            log.setLevel(Level.ALL)
            
            
            String issueKey = "ISSUE-1234"
            
            IssueManager issueManager = ComponentAccessor.getIssueManager()
            Issue issue = issueManager.getIssueByCurrentKey(issueKey)
            
            
            IssuePropertyService entityPropertyService = ComponentAccessor.getComponentOfType(IssuePropertyService)
            
            JiraAuthenticationContext jiraAuthenticationContext = ComponentAccessor.getJiraAuthenticationContext()
            
            
            EntityPropertyService.PropertyResult result = entityPropertyService.getProperty(jiraAuthenticationContext.loggedInUser as ApplicationUser, issue.id, "service-request-feedback-comment")
            
            
            String originalValue = result.entityProperty.first().value
            
            log.info(originalValue) //Returns a JSON string: {"comment":"THE FEEDBACK COMMENT GOES HERE"}
            
            
            EntityPropertyService.SetPropertyValidationResult validationResult = entityPropertyService.validateSetProperty(jiraAuthenticationContext.loggedInUser, issue.id, new EntityPropertyService.PropertyInput("{\"comment\":\"Has been updated\"}", "service-request-feedback-comment"))
            
            
            if (validationResult.isValid()) {
                log.info("IS VALID")
                result = entityPropertyService.setProperty(jiraAuthenticationContext.loggedInUser, validationResult)
                log.info("Updated result:" + result.entityProperty.first().value)
            } 

            anders.lantz added a comment - For anyone interested in reading and/or updating this information through the JAVA API, here is a POC:   import com.atlassian.jira.bc.issue.properties.IssuePropertyService import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.entity.property.EntityPropertyService import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.IssueManager import com.atlassian.jira.security.JiraAuthenticationContext import com.atlassian.jira.user.ApplicationUser import org.apache.log4j.Level import org.apache.log4j.Logger Logger log = Logger.getLogger( "Cleanup" ) log.setLevel(Level.ALL) String issueKey = "ISSUE-1234" IssueManager issueManager = ComponentAccessor.getIssueManager() Issue issue = issueManager.getIssueByCurrentKey(issueKey) IssuePropertyService entityPropertyService = ComponentAccessor.getComponentOfType(IssuePropertyService) JiraAuthenticationContext jiraAuthenticationContext = ComponentAccessor.getJiraAuthenticationContext() EntityPropertyService.PropertyResult result = entityPropertyService.getProperty(jiraAuthenticationContext.loggedInUser as ApplicationUser, issue.id, "service-request-feedback-comment" ) String originalValue = result.entityProperty.first().value log.info(originalValue) //Returns a JSON string: { "comment" : "THE FEEDBACK COMMENT GOES HERE" } EntityPropertyService.SetPropertyValidationResult validationResult = entityPropertyService.validateSetProperty(jiraAuthenticationContext.loggedInUser, issue.id, new EntityPropertyService.PropertyInput( "{\" comment\ ":\" Has been updated\ "}" , "service-request-feedback-comment" )) if (validationResult.isValid()) { log.info( "IS VALID" ) result = entityPropertyService.setProperty(jiraAuthenticationContext.loggedInUser, validationResult) log.info( "Updated result:" + result.entityProperty.first().value) }

            Jesse Ontiveros added a comment - jcleckler96521279 , you can vote for that here:  https://jira.atlassian.com/browse/JSDSERVER-8471

            James L Cleckler added a comment - - edited

            I am able to perform a search for this by using project = "XXX" and Satisfaction is not null and "Satisfaction Comment" is not EMPTY

            However, when I export the data the Satisfaction Comment is nowhere to be found.

            Has anyone been able to get the export to work to include Satisfaction Comments?

            James L Cleckler added a comment - - edited I am able to perform a search for this by using project = "XXX" and Satisfaction is not null and "Satisfaction Comment" is not EMPTY However, when I export the data the Satisfaction Comment is nowhere to be found. Has anyone been able to get the export to work to include Satisfaction Comments?

            Hi 7c56a68d4df4, this ticket only applies to the server/DC version of JSM.

            The request for this feature in cloud can be found here https://jira.atlassian.com/browse/JSDCLOUD-4317

            Aidan Goldthorpe added a comment - Hi 7c56a68d4df4 , this ticket only applies to the server/DC version of JSM. The request for this feature in cloud can be found here https://jira.atlassian.com/browse/JSDCLOUD-4317

            I can't seem to search on this in the Jira cloud platform. Does the above apply to server only? 

            alan.treston added a comment - I can't seem to search on this in the Jira cloud platform. Does the above apply to server only? 

            No, JSD 4.11 is only compatible with Jira 8.11

            Aidan Goldthorpe added a comment - No, JSD 4.11 is only compatible with Jira 8.11

            Is SD 4.11 compatible with Jira 8.5?

             

            K Stevenson added a comment - Is SD 4.11 compatible with Jira 8.5?  

            Jira Service Desk 4.11 is out now, and includes this feature! Important to note is that the satisfaction comments will only be searchable on new issues until a re-index is performed

            Aidan Goldthorpe added a comment - Jira Service Desk 4.11 is out now, and includes this feature! Important to note is that the satisfaction comments will only be searchable on new issues until a re-index is performed

            Is there any type of anticipated release date on implementation here?

            James L Cleckler added a comment - Is there any type of anticipated release date on implementation here?

            Commenting again - reporting against customer comments is fundamental to a service desk's operations. Please push this up the backlog.

            Zans McLachlan added a comment - Commenting again - reporting against customer comments is fundamental to a service desk's operations. Please push this up the backlog.

            All I really want is to be able to export comments to share with management and my teams.  Any workaround for that simple request?

            James L Cleckler added a comment - All I really want is to be able to export comments to share with management and my teams.  Any workaround for that simple request?

            +

            Jira Hostkey added a comment - +

            @Silvia, did you sort out your issue? Are you on an Oracle db? Might just be a syntax issue, I should specify my sql statement is for postgreSQL.

            Evangelos Vrocharis added a comment - @Silvia, did you sort out your issue? Are you on an Oracle db? Might just be a syntax issue, I should specify my sql statement is for postgreSQL.

            @Zans McLachlan , You should be able to search for star rating in filters. Field should be called Satisfaction and if you switch to advanced, you should be able to query i.e Satisfaction < = 3 to find all ratings 3 and lower.

            I would really like to get comments up though as we want to create an automation that notifies our mgmt if we get a CSAT with score 2 or lower or any CSAT with a comment so we can review the comment.

            Stian Bentsen Sveen added a comment - @Zans McLachlan , You should be able to search for star rating in filters. Field should be called Satisfaction and if you switch to advanced, you should be able to query i.e Satisfaction < = 3 to find all ratings 3 and lower. I would really like to get comments up though as we want to create an automation that notifies our mgmt if we get a CSAT with score 2 or lower or any CSAT with a comment so we can review the comment.

            Evangelos or Bartek, 

            would you be able to help with the scripted field?  I've created it with Searcher: Free Text Searcher
            Template: Text Field (multi-line)

            but get the following error:

            2019-08-23 00:36:16,228 WARN [sql.Sql]: Failed to execute: select json_value::json->>'comment' CV from entity_property where property_key = 'service-request-feedback-comment' and entity_id = ?; because: Missing IN or OUT parameter at index:: 2 2019-08-23 00:36:16,230 ERROR [runner.ScriptFieldPreviewRunner]: ************************************************************************************* 2019-08-23 00:36:16,230 ERROR [runner.ScriptFieldPreviewRunner]: Script field preview failed for field that has not yet been created java.sql.SQLException: Missing IN or OUT parameter at index:: 2 at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:2076) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4790) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:4845) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1501) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at Script57.run(Script57.groovy:17)

             

            Thank you, 

            Silvia

             

            Silvia Goljerova added a comment - Evangelos or Bartek,  would you be able to help with the scripted field?  I've created it with Searcher:  Free Text Searcher Template: Text Field (multi-line) but get the following error: 2019-08-23 00:36:16,228 WARN [sql.Sql] : Failed to execute: select json_value::json->>'comment' CV from entity_property where property_key = 'service-request-feedback-comment' and entity_id = ?; because: Missing IN or OUT parameter at index:: 2 2019-08-23 00:36:16,230 ERROR [runner.ScriptFieldPreviewRunner] : ************************************************************************************* 2019-08-23 00:36:16,230 ERROR [runner.ScriptFieldPreviewRunner] : Script field preview failed for field that has not yet been created java.sql.SQLException: Missing IN or OUT parameter at index:: 2 at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:2076) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4790) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:4845) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1501) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at Script57.run(Script57.groovy:17)   Thank you,  Silvia  

            Has anyone ever seen a comment on one of this that explains what criteria Atlassian uses to "accept" a suggestion? 

             

            Shrinath Desai added a comment - Has anyone ever seen a comment on one of this that explains what criteria Atlassian uses to "accept" a suggestion?   

            Please push this up the backlog.

            It is kind of silly that this field (as well as the star rating!) is not available in filters/accessible to end users/etc. 

            At what point does GATHERING INTEREST become IN PROGRESS?

            Zans McLachlan added a comment - Please push this up the backlog. It is kind of silly that this field (as well as the star rating!) is not available in filters/accessible to end users/etc.  At what point does GATHERING INTEREST become IN PROGRESS?

            Mike S added a comment -

            @Svante Gustafsson - VERY helpful. Have to pull this straight from the database until Atlassian makes it available through the API. The very first question management asked was for better reports on customer satisfaction, and nothing was available out of the box. Thanks!

            Mike S added a comment - @Svante Gustafsson - VERY helpful. Have to pull this straight from the database until Atlassian makes it available through the API. The very first question management asked was for better reports on customer satisfaction, and nothing was available out of the box. Thanks!

            Thanks Evangelos for the example! It works perfectly well and this makes it a valid workaround for this Jira Service Desk inconsistency (one of MANY).

            Bartek Zukowski added a comment - Thanks Evangelos for the example! It works perfectly well and this makes it a valid workaround for this Jira Service Desk inconsistency (one of MANY).

            For anyone that would like to have access to the comment and have it searchable, it is pretty straightforward to do so with a scripted field (scriptrunner) that grabs it from the database.

            import com.atlassian.jira.component.ComponentAccessor
            import groovy.sql.Sql
            import org.ofbiz.core.entity.ConnectionFactory
            import org.ofbiz.core.entity.DelegatorInterface
            import java.sql.Connection
            
            def delegator = (DelegatorInterface) ComponentAccessor.getComponent(DelegatorInterface)
            String helperName = delegator.getGroupHelperName("default")
            def sqlStmt = """select json_value::json->>'comment' CV
             from entity_property 
             where property_key = 'service-request-feedback-comment' and entity_id = ?;
            """
            Connection conn = ConnectionFactory.getConnection(helperName)
            Sql sql = new Sql(conn)
            try {
             StringBuffer sb = new StringBuffer()
                sql.eachRow(sqlStmt,[issue.id as Object]) {
             sb << "${it.CV}"
             }
             return sb.toString()
            }
            finally {
             sql.close()
            }
            

            Evangelos Vrocharis added a comment - For anyone that would like to have access to the comment and have it searchable, it is pretty straightforward to do so with a scripted field (scriptrunner) that grabs it from the database. import com.atlassian.jira.component.ComponentAccessor import groovy.sql.Sql import org.ofbiz.core.entity.ConnectionFactory import org.ofbiz.core.entity.DelegatorInterface import java.sql.Connection def delegator = (DelegatorInterface) ComponentAccessor.getComponent(DelegatorInterface) String helperName = delegator.getGroupHelperName( " default " ) def sqlStmt = """select json_value::json->> 'comment' CV from entity_property where property_key = 'service-request-feedback-comment' and entity_id = ?; """ Connection conn = ConnectionFactory.getConnection(helperName) Sql sql = new Sql(conn) try { StringBuffer sb = new StringBuffer () sql.eachRow(sqlStmt,[issue.id as Object ]) { sb << "${it.CV}" } return sb.toString() } finally { sql.close() }

            I finally found out how to grab the Satisfaction Comments from the db:

            select p.pkey, i.reporter, ep.json_value from entity_property ep
            join jiraissue i
            on (i.id = ep.entity_id)
            join project p
            on (i.project = p.id)
            where ep.property_key = 'service-request-feedback-comment'
            

            This will give you all issues (and their project) that have a Satisfaction Comment added

            Svante Gustafsson Björkegren added a comment - I finally found out how to grab the Satisfaction Comments from the db: select p.pkey, i.reporter, ep.json_value from entity_property ep join jiraissue i on (i.id = ep.entity_id) join project p on (i.project = p.id) where ep.property_key = 'service-request-feedback-comment' This will give you all issues (and their project) that have a Satisfaction Comment added

            Hey,

            We want to encourage our JSD customers to add Satisfaction comments by adding those who do this into a monthly raffle for some cool swags! (possibly also Atlassian swags )

            But to be able to do this we need to be able to search for all Satisfaction responses that includes a comment. I would love to see either a JQL implementation for this or a REST implementation. The very least would be to be able to grab this info direct from the db. I have searched for it but haven't found it so far.

            Cheers,

            // Svante

            Svante Gustafsson Björkegren added a comment - Hey, We want to encourage our JSD customers to add Satisfaction comments by adding those who do this into a monthly raffle for some cool swags! (possibly also Atlassian swags ) But to be able to do this we need to be able to search for all Satisfaction responses that includes a comment. I would love to see either a JQL implementation for this or a REST implementation. The very least would be to be able to grab this info direct from the db. I have searched for it but haven't found it so far. Cheers, // Svante

            sad

            siddharth patel added a comment - sad

              agoldthorpe Aidan Goldthorpe
              fdd224933d11 Jonny Carter
              Votes:
              181 Vote for this issue
              Watchers:
              96 Start watching this issue

                Created:
                Updated:
                Resolved: