Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to be notified about any created work item?

I would like to have following setup in my RTC (4.0.4) Project Area:
- automated mail notification for defined set of users when any workitem is created
OR
- automatically add user as a subscriber to every created wokr item.

Do you have any ideas how to achieve it?

1

0 votes


Accepted answer

Permanent link
If you want specific users to be added as subscribers to ALL workitems created in a project area, follow the instructions in this technote (no participant code required):
http://www-01.ibm.com/support/docview.wss?uid=swg21580771
Mateusz Cebula selected this answer as the correct answer

2 votes

Comments

Thanks! It is working :)


One other answer

Permanent link
I don't know of anything built-in to RTC, but you can do either using a server-side participant.  We add subscribers(s) to a work item upon creation (of a specific type) based on a role, but you can do a single user as well.  In your participant, you would do something like this:

IWorkItem workingCopy = (IWorkItem) fWorkItemServer.getAuditableCommon().resolveAuditable(workItem, IWorkItem.FULL_PROFILE, monitor).getWorkingCopy();

ISubscriptions subscriptions = workingCopy.getSubscriptions();
for (IContributorHandle subscriberHandle : subscribers) {
            subscriptions.add(subscriberHandle);
}
       
IStatus saveStatus = fWorkItemServer.saveWorkItem2(workingCopy, null, null);

where workItem is the work item passed to the participant and subscribers is an IContributorHandle[] containing the IContributorHandle's of the people you want subscribed.

We do it by role, so that we don't have to change code when someone else needs added or someone leaves, like this:
    private IContributorHandle[] findApproversByRole(IWorkItem newState, String roleName, IProgressMonitor monitor) throws TeamRepositoryException {
        fWorkItemServer = getService(IWorkItemServer.class);
        fAuditableCommon = getService(IAuditableCommon.class);
        fProcessServerService = getService(IProcessServerService.class);

        //All of this goes and gets the project area from the work item
        IProcessAreaHandle processAreaHandle = fWorkItemServer.findProcessArea(newState, monitor);
        IProcessArea processArea = (IProcessArea) fAuditableCommon.resolveAuditable(processAreaHandle, ItemProfile.createFullProfile(IProcessArea.ITEM_TYPE), monitor);
        IProjectAreaHandle projectAreaHandle = processArea.getProjectArea();
        IProcessArea projectArea = (IProcessArea) fAuditableCommon.resolveAuditable(projectAreaHandle,ItemProfile.createFullProfile(IProcessArea.ITEM_TYPE), monitor);
       
        //Get the members of the project area and then get people with the correct role at that process area level.
        IContributorHandle[] members = projectArea.getMembers();
        IContributorHandle[] matchingContributors = fProcessServerService.getContributorsWithRole(members, processArea, new String[] { roleName });
        return matchingContributors;
    }

For emailing, you can again, do the same kind of thing in a server-side participant but instead of doing the addition of the subscribers, you can use the RTC mailService to send an email.

Susan


0 votes

Comments

Thanks for the answer, but I have access only to RTC Web UI of my Project Area - I am user and have some admin priviledges to the Project Area, but I have no access to source code/server side or stuff like this. So is there any option to have it done?

no.. there is no way to do this with just administration functions

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,025

Question asked: Apr 04 '14, 4:42 a.m.

Question was seen: 3,900 times

Last updated: Apr 10 '14, 3:48 a.m.

Confirmation Cancel Confirm