It's all about the answers!

Ask a question

How do I pre-populate a field in a Work Item with two email addresses?


Frank Brewer (547) | asked Aug 27 '14, 9:46 a.m.
I am struggling to find a way to enter two email addresses in a field that I will hide for a Work Item that upon being "saved" will automatically send an email to two email addresses.  I want the field with the email addresses to be pre-populated and I do not want the person creating a Work Item to go through a list of users and select the two people who need to get a copy of the Work Item.

One answer



permanent link
Susan Hanson (1.6k2201194) | answered Aug 27 '14, 2:41 p.m.
So if I understand what you want ..
  .... when a work item is saved (do you mean just created, or every single time it is saved)
you want the same 2 email addresses to receive an email
you do not want the creating the work item to select who gets the email
and the same 2 people get the email for every work item?

If so, then I suspect you can write a server-side participant which gets called on the WorkItemSave action that would send 2 emails.  You could hardcode the email addresses in the participant, and even use some amount of logic to determine who to send the emails to (in the case of different people based on the values of one or more attributes).

RTC does provide a MailService for sending emails via participants if the mail service is enabled for that repository.

Comments
Susan Hanson commented Aug 27 '14, 2:42 p.m.

another option could to be write a Server-side participant to add one or more users to the subscribers of the work item so that then they would fall into normal RTC subscriber notifications.


Alex Akilov commented Aug 27 '14, 5:13 p.m.

There is a sample of such a participant in the RTC Extensions Workshop (Lab2).  It allows you to invoke a build on work item status change.  Your build definition can have an email participant that contains your addressee list. 

Your answer


Register or 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.