Subscribers with condition

2 answers

JavaScript has no access to complex items like subscribers. This blog post shows how you can create a follow up action to do that kind of tasks after the work item save: https://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/
The post shows how to add an approval, but subscribers should be very similar.

Comments

If you can detect the work items that are relevant e.g. by a query you could run a client that runs every now and then and modifies the work item with the client API e.g. https://rsjazz.wordpress.com/2012/10/29/using-work-item-queris-for-automation/
That is the only alternative to a server extension I see.
If you want to develop a server extension, I would suggest to follow my advice in the blog post how to get started and set up a local development environment that you can use to create and test your extension. You would only have to have someone to deploy the extension on that server.

This I followed reading this article https://jazz.net/library/article/1003

We have discussed this over and over here, the JavaScript API is limited. See https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript and carefully read it. Read Lab 5 at the beginning of https://jazz.net/library/article/1093
If you look, you will not find an Attribute "Subscribers", because subscribers is no attribute but a built in complex collection. JavaScript has no access to it and I don't think you can configure a value provider for it. Similar to approvals, work item links, information on team areas, attachments, roles or information in other work items this is something JavaScript can not access today..

Ok, but the link you sent me the tool as a first response, is already up and running? I insert it into the RTC server and works immediately, of course modifying the attributes?

I would suggest to read the information behind the links I sent that you find relevant. Subscribers is not attribute based. The one article adds an approval, not a subscriber, as the name of the link suggests. You could use that to try to develop a subscriber participant.
The API to add a subscriber on the server looks as follows:
private void createSunscriptionFromLoggedInUser(IWorkItem workItem, IParticipantInfoCollector collector,IProgressMonitor monitor) throws TeamRepositoryException { IContributorHandle currentUser = this.getAuthenticatedContributor(); workItem.getSubscriptions().add(currentUser); }