Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira DC 9.12.22 Assets - How to add Watchers programmatically?

Trudy Claspill
Community Champion
June 12, 2025

Working with Jira Data Center 9.12.22 (JSM 5.12.22).

We have recently converted ~1800 JSM Issues to Asset Objects.

The last thing I'm trying to figure out is how to take the Watchers of the issues and add them as Watchers of the corresponding objects.

I did not see anything in the REST API that applies to Watchers of Objects, but I may have missed it.

https://developer.atlassian.com/server/jira-servicedesk/rest/v1006/api-group-assets---object/#api-group-assets---object

We have ScriptRunner on the instance but I didn't see anything in that documentation that specifically addressing asset object Watchers.

https://docs.adaptavist.com/sr4js/latest/hapi/work-with-assets-insight

I did find something in the riadalabs packages, but I'm not really sure how to use it.

https://docs.atlassian.com/assets/10.7.1/com/riadalabs/jira/plugins/insight/services/model/ImmutableWatcherBean.html

 

Even looking at the objects in the UI, I can start Watching an object and stop Watching an object, but I did not see a way to manage other Watchers of the object.

1 answer

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
June 16, 2025

I contacted Atlassian Support to ask them about options for managing Watchers of objects. This is their response:

I'm afraid there is no out-of-the-box feature for adding the Watcher to the Assets Object in bulk. We have a feature request to add support for managing watchers via the REST API; however, this has not been implemented yet.

We encourage you to vote on the feature request ticket to increase its popularity and add yourself as a watcher to be kept informed of progress going forward. For more details on how Atlassian handles and prioritizes new feature requests, please refer to the Implementation of New Features Policy. I've also already added this case to the internal list of cases associated with it.

Regarding the approach to managing watchers, in relation to this, Assets, this is still quite limited, but we can check the information through the database.
The following SQL query will list all the objects with watchers:

SELECT * FROM "AO_8542F1_IFJ_OBJ_WATCH";

What I opted to do for this scenario was to add a User attribute to the objects and manage our object "watchers" through that attribute instead.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events