How to print Watchers of an Issue?

In this guide, we will show you how to print the Watchers of an Issue using our Reporter plugin.

Code examples

We got an issue with 3 watchers added to it.


We could print them in a short way. Just in a row one after another, separated with a comma. The following code is used.

{{ issue.watchers.all | map: 'name' | join: ', ' }}

And the result is this one.


Also, we will provide one more example with a bit more information added for the watchers. They will be listed with the ID of the user, first name, last name, full name, and email. This code is used.

{% for watcher in issue.watchers %}
    <span>{{ }}, </span>
    <span>{{ }}, </span>
    <span>{{ watcher.firstname }}, </span>
    <span>{{ watcher.lastname }}, </span>
    <span>{{ watcher.mail }}</span>
{% endfor %}

As a result, you will have this list.


Video demonstration

Was this article helpful? Yes  No
114 from 141 found this helpful