It's all about the answers!

Ask a question

How to get notification when someone changes a workitem? (


Ping Cheng (161) | asked Dec 09 '08, 5:38 a.m.
Hi,

If you subscribe a workitem, the Jazz server will send you an email when
someone changes this workitem (such as changing the status, adding comments,
etc).

Now I want to show this kind of notification in RTC directly, for example,
pop up an alert dialog in RTC when somebody changes the workitem which I've
subscribed.

I've tried the IWorkItemListener, but unfortunately it only receives the
change events occurred in local - that means I can not get notification when
someone else changes the workitem.

Is there any way to listen a given workitem's change events in RTC?

Many thanks for your help.


Ping

4 answers



permanent link
Patrick Streule (4.9k21) | answered Dec 09 '08, 4:38 p.m.
JAZZ DEVELOPER
If you subscribe a workitem, the Jazz server will send you an email when
someone changes this workitem (such as changing the status, adding
comments,
etc).

Now I want to show this kind of notification in RTC directly, for
example,
pop up an alert dialog in RTC when somebody changes the workitem which
I've
subscribed.

RTC already provides this kind of notification out of the box. Change
events are available as Atom feeds, and you can also configure alerts for
them. Take a look at the Feeds domain in the Team Artifacts view, the feed
sections in Team Central, and the preferences for Notifications.

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Ping Cheng (161) | answered Dec 09 '08, 8:48 p.m.
Great! That's what I want! Thanks for your reply Patrick.

In addition, I'd like to read the code to see how it works, could you please
give me some hints? Which plug-ins' code shoud I look for?

Thank you!

"Patrick Streule" <patrick_streule> :op.ulwzdywfxfsgax@h002332af9e8e.mac.zurich.ibm.com...
If you subscribe a workitem, the Jazz server will send you an email when
someone changes this workitem (such as changing the status, adding
comments,
etc).

Now I want to show this kind of notification in RTC directly, for
example,
pop up an alert dialog in RTC when somebody changes the workitem which
I've
subscribed.

RTC already provides this kind of notification out of the box. Change
events are available as Atom feeds, and you can also configure alerts for
them. Take a look at the Feeds domain in the Team Artifacts view, the feed
sections in Team Central, and the preferences for Notifications.

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Ping Cheng (161) | answered Dec 09 '08, 11:12 p.m.
I just found an related article in Jazz Team Wiki: https://jazz.net/wiki/bin/view/Main/FoundationNotifierTutorial

Great! That's what I want! Thanks for your reply Patrick.

In addition, I'd like to read the code to see how it works, could you please
give me some hints? Which plug-ins' code shoud I look for?

Thank you!

"Patrick Streule" <patrick_streule> :op.ulwzdywfxfsgax@h002332af9e8e.mac.zurich.ibm.com...
If you subscribe a workitem, the Jazz server will send you an email when
someone changes this workitem (such as changing the status, adding
comments,
etc).

Now I want to show this kind of notification in RTC directly, for
example,
pop up an alert dialog in RTC when somebody changes the workitem which
I've
subscribed.

RTC already provides this kind of notification out of the box. Change
events are available as Atom feeds, and you can also configure alerts for
them. Take a look at the Feeds domain in the Team Artifacts view, the feed
sections in Team Central, and the preferences for Notifications.

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Patrick Streule (4.9k21) | answered Dec 10 '08, 5:08 a.m.
JAZZ DEVELOPER
In addition, I'd like to read the code to see how it works, could you
please
give me some hints? Which plug-ins' code shoud I look for?

Some code pointers:

Notification API:
com.ibm.team.foundation.rcp.core.notification

To listen to feeds/change events:
com.ibm.team.feed.core.INewsListener
com.ibm.team.feed.core.FeedManager

An example snippet:

fFeedManager= FeedManager.getDefault();
String myChangesFeedKey=
IWorkItemFeedConstants.UTILITY.getMyChangesFeedKey(getTeamRepository().getRepositoryURI());
fMyWorkItemNewsChannel=
fFeedManager.getPredefinedChannel(myChangesFeedKey);
if (fMyWorkItemNewsChannel != null) {
fWorkItemNewsListener= new NewsListener();
fFeedManager.addNewsListener(fMyWorkItemNewsChannel,
fWorkItemNewsListener);
}


--
Regards,
Patrick
Jazz Work Item Team

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.