Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Subscribers with condition

 Hello,
I created a list of subscribers, and I would like to insert it based on the value of the "filed against."
I created a javascript but it does not work, what can I do?
please help me! :D

0 votes



2 answers

Permanent link
Fabio,

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.

0 votes


Permanent link
 Hello Ralph,
then to do what I required I have to do a server-side program? right?
I do not have access to the server in order to plan the program, there is no alternative?

0 votes

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.

but if I have created a default value of user list called "SWCC".
I created a condition based on javascript (the script is written, the condition that if "filed in" change field subscriber takes "SWCC" as the default value) and I associated the operation of the operation?

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);
}


Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,939

Question asked: Nov 05 '13, 8:44 a.m.

Question was seen: 4,973 times

Last updated: Nov 06 '13, 4:34 a.m.

Confirmation Cancel Confirm