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
|
2 answers
Ralph Schoon (63.5k●3●36●46)
| answered Nov 05 '13, 9:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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. |
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?
Comments
Ralph Schoon
commented Nov 05 '13, 10:16 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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/
Fabio Bandelli
commented Nov 05 '13, 10:50 a.m.
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
Ralph Schoon
commented Nov 05 '13, 11:03 a.m.
| edited Nov 05 '13, 11:05 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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
Fabio Bandelli
commented Nov 06 '13, 4:12 a.m.
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?
Ralph Schoon
commented Nov 06 '13, 4:29 a.m.
| edited Nov 06 '13, 4:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.
private void createSunscriptionFromLoggedInUser(IWorkItem workItem, IParticipantInfoCollector collector,IProgressMonitor monitor) throws TeamRepositoryException { IContributorHandle currentUser = this.getAuthenticatedContributor(); workItem.getSubscriptions().add(currentUser); } |
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.