We have a Jira project where the users permitted to access each ticket are stored in a "Permitted Users" field, which is a multi-select user field. I'd like to automate how this field gets populated as follows:
- When a comment is added to the Jira issue, detect any users who have been tagged in the comment body.
- Add these users to the custom field, thereby permitting them access to the issue.
The alternative is adding the users to this field manually, but unfortunately people often forget to do so - they assume (as with many other information systems) that tagging a user is sufficient to send them a notification / grant them access.
This seems like a simple workflow, but I haven't been able to find a way to pick out the users who have been tagged in the comment body, nor to specify that the field value should be updated rather than replaced with the new values.
How can I achieve this?