It's all about the answers!

Ask a question

How can I customize Subscribers list based on Work Item Type ?

R Z (1272948) | asked Nov 05 '21, 5:52 a.m.
edited Nov 08 '21, 1:52 a.m.
I have few set of users who are interested in getting alerts for specific work item type when ever new record is created.
How can I do that ? They are interested only in Task work item but not other work item types like Defect, Epic or Stories etc.

If I understood correctly, Subscribers field is common across all work item types and any customization we introduce it reflects in all work item types.


One answer

permanent link
Ralph Schoon (62.0k33643) | answered Nov 08 '21, 2:55 a.m.

It does not help to write everything in bold face. Common netiquette considers that rude.

You have read and ignored the previous answers, so my summary of the options you can try - as far as I can tell. 

1. Attribute customization. The default value provider available does not distinguish the work item types and can not be made to. 
1.1 You can try to use a JavaScript default or calculated value. You can access the work item type and decide if you return just the current value or modify it based on that. The data is accessible using the attribute ID "internalSubscriptions". I am not sure if you can construct the required values to set/return the correct data. Strictly speaking there is no specific support for contributor arrays.
1.2 I am 99% certain that you can create a Java Based default value or calculated value where you can add subscribers.
2. Follow up action. 
2.1 You can create a server extension for the work item save operation that adds subscribers based on the work item type.
2.2. You can create a server extension for the work item save operation that uses the Mail API to sent messages based on the work item type.

Your answer

Register or to post your answer.