Use case

Return the number of users who have commented in the issue.

Expression

Create and configure a Smart field using this expression in Jira expression mode:

issue.comments.map(comment => comment.author.displayName).reduce((a, b) => a.includes(b) ? a : a.concat(b), []).length