It's all about the answers!

Ask a question

Temporary disable e-mail alerts before WI comment


Tom Roach (2121) | asked Feb 04 '11, 10:18 a.m.
I'm using the Java API to add a comment to a workitem as follows


/*

* Generate a working copy of the work item which can be modified.
*/
WorkItemWorkingCopy workingCopy = workingCopyManager.getWorkingCopy(workItemHandle);

IWorkItem workItemToBeModified = workingCopy.getWorkItem();

/*
* Get the comments create a new one, and save the change.
*/
IComments comments = workItemToBeModified.getComments();
IComment comment = comments.createComment(myRepository().loggedInContributor(), XMLString.createFromXMLText(commentText));
comments.append(comment);
workingCopy.save(null);


I use this to add a comments to multiple workitems, each comment containing references to all the others: i.e.
"Task 12345, Task 67891, Defect 76543"etc so that a user can read the comment in one workitem and be able to click the Task Numbers to get to the others.
But because it's a link, anybody with with e-mail alerts for mentions links who is subscribed to all the workitems gets a LOT of e-mail.

My question - is it possible to silently create these links without firing the event for the mentions link which sends the e-mail out?
Or is it possible to temporarily disable the event listener which picks up the Mentions Link creation before I make the comment, then reinstate it afterwards?

Any suggestions?

One answer



permanent link
Tom Roach (2121) | answered Feb 11 '11, 8:50 a.m.
Any feedback on this at all? Perhaps just a pointer in the right direction?

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.