how do you surpress email from a large work item migration?
Well, we should have saw this one coming, but we just imported a thousand records into RTC and immediately started getting pinged about the flood of email users were getting. We did want to let them know that the migration into RTC was complete, but not one record at a time :) Question 1: is there a smarter way than just turning off email for the whole repository to avoid email to every ticket owner? Question 2: the poor guy that did the import is now subscribed to every work item. Might someone have a script that uses the API to remove a subscriber from a named set of tickets? A nice toggle for email preferences would be to surpress attaching me as a suscriber to tickets I create.
3 answers
For your second question, I don't have a script, but if you're using RTC 4.0, you can do this from the eclipse client.
1. Create a query that will return all of the work items this user wants to unsubscribe to
2. Run the query in the eclipse client
3. Select all the work items it returns, right click and select Subscriptions->Unsubscribe me
1. Create a query that will return all of the work items this user wants to unsubscribe to
2. Run the query in the eclipse client
3. Select all the work items it returns, right click and select Subscriptions->Unsubscribe me
Has anyone tried to switch e-mail notification off on the server (advanced properties). If it is off, the server should not send e-mails, right? And that should preserve the subscriptions too.
Unfortunately none of my test servers is set up with e-mail notification, so I can't test. I would be interested in the outcome however.
Unfortunately none of my test servers is set up with e-mail notification, so I can't test. I would be interested in the outcome however.
Comments
I think we need a routine that can
1. get the email status for a user
2. set the send me an email flag for that user (to off) for the migration period
later use the data from 1, to restore the send me an email flag, for the user.
| based on quick review of the code, this looks like it will require use of internal classes
no internal classes required.. get the users details record and the email config from the extended attributes
the email config is stored in this key "com.ibm.team.workitem.mail.Configuration", and it is an xml document.
if not previously set, the server code uses a default string.
given the contributor record, and the item manager from the repository connection you can get the email config like this
IContributorDetailsHandle detailsHandle= contributor.getDetails();
if (detailsHandle != null)
{
IContributorDetails details=
(IContributorDetails) iim.fetchPartialItem(detailsHandle, IItemManager.REFRESH,
Collections.singleton(
IExtensibleItem.ALL_STATE_EXTENSIONS_PROPERTY),null);
// get the writeable copy of the details
details=(IContributorDetails) details.getWorkingCopy();
// get the email config value, if any
String configVal= details.getLargeStringExtension(CONFIG_KEY);
}
1. get the email status for a user
2. set the send me an email flag for that user (to off) for the migration period
later use the data from 1, to restore the send me an email flag, for the user.
| based on quick review of the code, this looks like it will require use of internal classes
no internal classes required.. get the users details record and the email config from the extended attributes
the email config is stored in this key "com.ibm.team.workitem.mail.Configuration", and it is an xml document.
if not previously set, the server code uses a default string.
given the contributor record, and the item manager from the repository connection you can get the email config like this
IContributorDetailsHandle detailsHandle= contributor.getDetails();
if (detailsHandle != null)
{
IContributorDetails details=
(IContributorDetails) iim.fetchPartialItem(detailsHandle, IItemManager.REFRESH,
Collections.singleton(
IExtensibleItem.ALL_STATE_EXTENSIONS_PROPERTY),null);
// get the writeable copy of the details
details=(IContributorDetails) details.getWorkingCopy();
// get the email config value, if any
String configVal= details.getLargeStringExtension(CONFIG_KEY);
}
Comments
frederick carter
Feb 17 '13, 1:48 a.m.Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Feb 17 '13, 1:48 a.m.