How to change the default settings in "Mail Configuration" ?
Dear All,
I am working with a customer that wants to change the default settings in "Mail Configuration", somewhat like screen below. Reason is that customer wants to get email notification for everyone, but only under fewer situations than default. There are many users in RTC, and setting up a new default "Mail Configuration" is needed. My question is similar to "https://jazz.net/forum/questions/85712/modifying-the-template-of-the-mail-notifications-in-rtc-3x", unfortunately, there has been no answer so far. Thanks for reading, and suggestions are always welcome. |
Accepted answer
Ralph Schoon (63.5k●3●36●46)
| answered Jan 14 '13, 5:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi,
I was not able to find a setting for the mail configuration. Maybe someone has more info. I was however able to find how the configuration is set in the Java API. It is part of the details of a contributor. You can access the data using the following code: IContributorDetails details = (IContributorDetails) teamRepository .itemManager().fetchCompleteItem( contributorWorkingCopy.getDetails(), IItemManager.DEFAULT, null); details = (IContributorDetails) details.getWorkingCopy(); IContent photo = details.getPhoto(); String mailconfig = details.getLargeStringExtension("com.ibm.team.workitem.mail.Configuration"); You can follow http://rsjazz.wordpress.com/2013/01/08/maintaing-user-photos-with-the-plain-java-client-libraries/ and provided you get the default from an example user, use that to set the default using a commandline. You might need to go through Hong Kong to get at the blog. In case of WordPress blogs, you can append the string ".nyud.net" to the blog URL and it should open just fine. For instance, if the main blog is located at labnol.wordpress.com, you can access a mirror image of this site from labnol.wordpress.com.nyud.net." We have seen http://rsjazz.wordpress.com.nyud.net/ is accessible through Hong Kong. Sorry, my best solution at the moment. yk wu selected this answer as the correct answer
Comments
Ralph Schoon
commented Jan 14 '13, 9:32 a.m.
| edited Jan 14 '13, 9:36 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The code can be found in com.ibm.team.workitem.ide.ui.internal.mailconfig.MailConfigFormPage.doSave(IProgressMonitor);
sam detweiler
commented Jun 11 '14, 3:27 p.m.
there is no builtin function to set them a specific way.
|
2 other answers
I have written a code to update mail format settings - it fails to fetch the contributor details and throuws null exception on the mailconfig retrieval:
*It works after i open the particular user in the editor and perform a save. user = icm.fetchContributorByUserId(userid, null); contributorWorkingCopy = (IContributor) user.getWorkingCopy(); icm.saveContributor(contributorWorkingCopy, null); IContributorDetailsHandle detailsHandle = contributorWorkingCopy.getDetails(); details = (IContributorDetails) iim.fetchCompleteItem(detailsHandle,IItemManager.DEFAULT, null); details=(IContributorDetails) details.getWorkingCopy(); String mailconfig = details.getLargeStringExtension("com.ibm.team.workitem.mail.Configuration"); mailconfig value is retrieved as null.Please advise. Comments
sam detweiler
commented Feb 03 '15, 7:17 a.m.
the only thing I can see that is different is that I ask the Item Manager to REFESH
|
Hi sam,
If i open user "a" in the editor, and save it with 0 changes (*just inserting a space and removing it for example) update code runs fine for the above case. it fetches mail config and updates. For all other user ids, it fails to read the mail config via "getlargestringextension" - i tried both default,refresh. The mail config is retrieved as null, other properties of details like mail address,etc have values. Comments
sam detweiler
commented Feb 03 '15, 8:01 a.m.
No idea.. my code (linked above) has been working for almost 3 years unchanged without any issue.
Please, next time, create a new question, as the one is already closed as answered.
|
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.