It's all about the answers!

Ask a question

How to get the list of subscribers in a particular workitem

Govindaraj Ponnusamy (116) | asked Jun 13 '16, 7:52 a.m.
Hi All,

I would like to get a list of subscribers pertaining to the workitem in RTC either script code or serverside code.

Thanks in Advance.

2 answers

permanent link
Ralph Schoon (62.3k33643) | answered Jun 13 '16, 8:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER shows how to get the subscriptions as part.

Govindaraj Ponnusamy commented Jun 14 '16, 1:40 a.m.

Hi Ralph,

The link which you have given is showing how to add the subscriber programmatically instead of how we can check the number of subscribers count. Please let me know, how to get the number of subscriber list.



Ralph Schoon commented Jun 14 '16, 2:30 a.m.

It shows how to get the subscribers in the line before it add a new one. If you want to be able to extend RTC you should be able to work with blogs like that and read the code.

permanent link
Akshay Daga (132) | answered Jul 09 '19, 5:30 a.m.

  IWorkItem workitem = workitemClient.findWorkItemById(id, IWorkItem.FULL_PROFILE, null);

    for(IContributorHandle subscriber : workitem.getSubscriptions().getContents())
    IItemManager itemManager = repo.itemManager();
    IContributor contributor = (IContributor) itemManager.fetchCompleteItem(subscriber , IItemManager.DEFAULT, monitor );
     contributor.getName(); //-----> Subscriber's name
      contributor.getEmailAddress(); //------> Subsciber's Mail Id

Your answer

Register or to post your answer.