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

How do I get an EnumerationList (multiple choice)?

 I'm using the Java EWM plugin in RTC7.0.2.

I don't know how to get the value of the Multiselection List( Enumeration List )

How can we get it?

0 votes


Accepted answer

Permanent link

I am sorry. I solved it in the following way. 

 IAttributeHandle attributeHandle = workItemServer.findAttribute(iProjectArea, attributeName, monitor);

  IAttribute artifactAttribute = (IAttribute) itemService.fetchItem( attributeHandle, IRepositoryItemService.COMPLETE );

  Object artifactObj = workItem.getValue(artifactAttribute);
 
  ArrayList list = (ArrayList<String>) artifactObj;
  
  for( int i=0;i < list.size() ; i++ ){
 
   IEnumeration enumeration = workItemCommon.resolveEnumeration( artifactAttribute, monitor );

   ILiteral literal = enumeration.findEnumerationLiteral( (Identifier<ILiteral>) list.get( i ) );


   targetName = literal.getName();

  }
  

Ralph Schoon selected this answer as the correct answer

0 votes

Comments

The question would have been, how do I access work item attributes of type enumeration list using the EWM SDK or the Plain Java API. I would have suggested to look into  https://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/


One other answer

Permanent link

Click on attribute in editor, see the results. 


If you expect a different answer provide a better question. E.g. read How should I ask a question in the Forum if I want to receive useful answers? and modify your question accordingly. Sigh, my answer is already way longer than the original question.

0 votes

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
× 1,222

Question asked: Feb 24 '22, 3:10 a.m.

Question was seen: 1,532 times

Last updated: Feb 24 '22, 8:24 a.m.

Confirmation Cancel Confirm