Using Work Items attribute customization( java script ) can we set subscribers based on a Status?
One answer
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.