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

How to add 'Unassigned' contributor to Value set?

Hello,

I am using Value set plugin to populate Contributor. Each time as per the selection of Team, I m populating members from that time. What I am expecting is to have 'Unassigned' contributor value in value set.
I have one more Value set plugin, which will populate Categories and for that I used below code to have 'Unassigned' category value.

ICategory unassignedCategory= workItemCommon.findUnassignedCategory(workItem.getProjectArea(),ICategory.FULL_PROFILE,monitor);
finalChoiceList.add(unassignedCategory);

So final list is having one 'Unassigned' category value. Same I want to have for Contributor. can anyone please suggest, how it can be achieved?

Thanks in advance. 

0 votes



One answer

Permanent link
 In https://rsjazz.wordpress.com/2015/10/16/due-date-notifier-an-asynchronous-task-example/ I used the ID of the contributor te retrieve the record. I haven't found a better way so far.

0 votes

Comments

 Hello Ralph,


Thanks for reply!!
I checked example. In this,
IContributor owner = (IContributor) getRepositoryService().fetchItem(
                ownerHandle, IRepositoryItemService.COMPLETE);
        if(owner.getUserId().equalsIgnoreCase(UNASSIGNED_USER_ID)){
            // You might want to do something, e.g. annoy someone else.
            return;
        }

</pre>
<pre>

It looks like, we are checking, whether Owner field is 'Unassigned'. What I am trying to have is to add 'Unassigned' Value to populated list. So, this Value set plugin should return result as,

</pre>
<pre>

Unassigned Ralph Avinash ABC . .

</pre>
<pre>

I dont know how to fetch this Unassigned contributor and add it to list before returning value set. Kindly revert for any concerns. Thanks.

Search for the user ID "unassigned" or "Unassigned" I don't recall the actual value. That is what the code above does, it looks at the user ID and if that is "unassigned" it is the special unassigned user. You can get the user record for that ID and pass it.

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

Question asked: Nov 03 '15, 3:51 a.m.

Question was seen: 1,529 times

Last updated: Nov 03 '15, 4:48 a.m.

Confirmation Cancel Confirm