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

Using Work Items attribute customization( java script ) can we set subscribers based on a Status?

I have script which I use for assigning Owner WorkItemAttributes.OWNER

for Subscriber I don't see any
  built-in attributes of the work item.

Any suggestions on assigning subscribers for workitem?

0 votes



One answer

Permanent link
I dont' believe SUBSCRIBERS attribute is supported via JavaScript (https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript) .. We set subscribers on creation of certain work items but we do it via Java-based participants.

0 votes

Comments

I want to support Susan's statement.

You can, as far as I am aware, not access the subscribers. They are not an attribute but a collection. There is no attribute defined either. See: https://jazz.net/forum/questions/108554/calculated-value-script-to-read-work-item-subscribers-rational-team-concert

Is there any other way to set subscriber based on few other attributes? eg- want to subscribe to a user if the status is Submitted and a component is X?

Yes, within a java-based participant. Within the participant, you have normal java logic based on the values present in the work item after the save.  You can get the status and the component (whatever attribute that is, the built-in Category or a custom attribute) and then based on if-then-else logic, subscribe who you want.

See https://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/ for a participant and https://rsjazz.wordpress.com/2012/08/02/subscribing-to-a-work-item-using-the-java-api/ for the API. It is client API, but the common API on the server would allow this in the same way.

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
× 12,029

Question asked: Dec 08 '14, 8:25 p.m.

Question was seen: 3,350 times

Last updated: Dec 10 '14, 2:11 a.m.

Confirmation Cancel Confirm