filterLocal

    Signature

    Helper commentHelper
    Signature
    filterLocal(List comments)
    Description

    Return a list of comments where the visibility has not been restricted (no group or role level assign to the comment). 

    Introduced in 0.10

    Example use

    // ensure that only public comments are sent over to the remote instance
    replica.comments = commentHelper.filterLocal(issue.comments)

    Comments

    You can restrict the visibility of the comments in JIRA to a particular group of users (i.e team members, or management ...).
    To restrict comments sent to the remote instance, you need to specify the filter in the outgoing sync(data filter).

    For Jira Service Desk 3.0 and higher

    Jira has introduced internal comments, the commentHelper.filterLocal does not work in this case.
    Please use the following code instead

    replica.comments = issue.comments.findAll { !it.internal }