Problem
Could not filter Service Management internal comments with filterLocal commentHelper.
Cause
Jira has introduced internal comments in Service Management 3.0. The commentHelper.filterLocal does not work in this case. This also can be caused by not setting the customer request type.
Solution
Use the following code to filter local comments:
replica.comments = issue.comments.findAll { !it.internal }
Make sure the customer request type is synchronized properly.
For more information, check out the following articles:
Jira Server: How to sync the Customer request type field in the Jira Service Management