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
built-in attributes of the work item.
Any suggestions on assigning subscribers for workitem? |
One answer
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.
Comments
Ralph Schoon
commented Dec 09 '14, 5:31 a.m.
| edited Dec 09 '14, 5:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I want to support Susan's statement.
Aparna Sukumaran
commented Dec 09 '14, 12:54 p.m.
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?
Susan Hanson
commented Dec 09 '14, 2:50 p.m.
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
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.