Category based suscription of user
Hi,
I have a requirement that i want automatic subscription of a a particular user when i select the categories.
Like
Category A if i select user1 should get subscribe automatically
category B if i select then user2 should get subscribe automatically
..Is this possible?
I can auto subscribe using default Value set using user list.But i want that suscribe based on category value.
2 answers
You can do this by using a script based Default value provider for Subscriptions.
You will need to return an array containing the User ID of the Subscriber(s) you want to add - if this is a static list then you can store them in the project area configuration data and get access to them via the 'configuration' parameter that is passed in to the function. The best way to see what's required is to create a calculated Default value script, populate with the template code, and add
console.log(workItem.getValue(attribute));
Attach this to your Subscriber field and add a bunch of users, and check the web browser console.
PS: You actually can do all the things in your list above, but you have to be very careful how it's done or else you can introduce performance issues.
Comments
showing 5 of 7
show 2 more comments
I believe that autosubscribe does not make sense. A valid process would be that there is a person looking at the work items incoming for their category on the dashboard and then handles (and maybe changes the category) the incoming work item.
It might be possible to create calculated values that do that https://www.ibm.com/support/knowledgecenter/SSYMRC_7.0.1/com.ibm.team.workitem.doc/topics/c_calc_val_attribute_config.html but I am not sure based on the fact that you always have to return a value. I have not tried that. It is unlikely possible using a JavaScript solution, because the official API https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript does not allow to read the subscriptions using an attribute - at least not officially. Also the fact that a calculated value always must return a value could be problematic.
It would likely be possible to create a Java based calculated value, but that needs to be deployed on the server and the Eclipse clients.
A follow up action could do that in any case, but the effort to write one is considerable.