It's all about the answers!

Ask a question

Java Code for deliver operation is performed on source code?


Princi Verma (28222) | asked May 24 '17, 2:45 a.m.

 Hi,


Is it feasible to send a mail notification when a deliver operation is performed in Source Code. How can I achieve this?

I mean how can I find the delivered change set to send the Email Notification?


Thanks and Regards,
Princi Verma

One answer



permanent link
Ralph Schoon (63.1k33646) | answered May 24 '17, 8:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Like with any of these requests, you would likely have to create a custom server extension. Like a follow up action or something driven by something else such as an asynchronous task or something event driven. You would use the operation ID explained in https://rsjazz.wordpress.com/2012/11/01/restrict-delivery-of-changesets-to-workitem-types-advisordelivery-of-changesets-associated-to-wrong-work-item-types-advisor/ . That is a pre condition, but the code is pretty much the same and the "Getting started" explains a workshop which is for a follow up action.


 


Comments
Princi Verma commented May 24 '17, 9:44 a.m.

 Thanks Ralph !


I will try the above solution.


Ralph Schoon commented May 24 '17, 9:46 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Princi Verma commented May 25 '17, 3:35 a.m.

 Ok thanks !


Princi Verma commented May 25 '17, 6:35 a.m.

 Hi Ralph,


In email notification, when I am using getMailService() method then its showing compilation error, the method is undefined for the ImplClass. 

So is there dependency issue, because it comes under 'com.ibm.team.repository.service.internal.MailerService' and I have added 'com.ibm.team.repository.service'.

Please suggest.

Thanks and Regards,
Princi Verma


Ralph Schoon commented May 25 '17, 6:55 a.m. | edited May 25 '17, 7:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

My suggestion would be for you to start reading the posts and follow the advice on how to get started with this whole stuff, which I have in all of the blog posts to help the newbies. Plus, the downloadable code I provide has worked for me. Finally, you will have to find the imports you need on your own and it is actually not that complicated and you can look into the downloadable code in most of my posts too.


Princi Verma commented May 26 '17, 5:42 a.m.

 Hi Ralph,


The problem is resolved as I have added 'javamail-1.4.5' jars in the build path.
As well as interface= "com.ibm.team.repository.service.MailSender", required service in MANIFEST.MF prerequisites.

Thanks and Regards,
Princi Verma

showing 5 of 6 show 1 more comments

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.