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

programmatic query "Unresolved" work items

I'm working on doing some programmatic queries.  I have done this successfully for a variety of things, but now hit something I can't figure out...
I'm query work items by State, so I have the IQueryableAttribute for STATE_PROPERTY.
      IQueryableAttribute stateAttribute = sourceRepo.findQueryableAttribute(IWorkItem.STATE_PROPERTY);
However, I can't figure out who to get the stateAttribute to be "Unresolved".  If I just am looking for a very specific state:
AttributeExpression workItemStatusExpression = new AttributeExpression(stateAttribute, AttributeOperation.EQUALS, "com.ibm.team.apt.story.idea"); 
But I don't really want to have to do this for every "Unresolved" work item type in my entire project area.  
Is there a   new AttributeExpression(attribute, operator) method, but I can't find an operator that says AttributeOperation.UNRESOLVED.

Is this possible??

Thanks, Susan

1

0 votes


Accepted answer

Permanent link
Susan,

I would consider to use
com.ibm.team.workitem.common.expression.variables.StatusVariable
Unresolved states are not in the GROUP_CLOSED group. I found this simply searching for the STATE_PROPERTY:
Expression states= new VariableAttributeExpression(getAttribute(IWorkItem.STATE_PROPERTY), AttributeOperation.EQUALS, new StatusVariable(StatusVariable.OPEN_AND_IN_PROGRESS_STATES));
these should be the unresolved states.
Susan Hanson selected this answer as the correct answer

2 votes


One other answer

Permanent link
SWEET!!!  You rock!

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
× 10,927

Question asked: Oct 04 '12, 9:55 p.m.

Question was seen: 5,684 times

Last updated: Oct 09 '12, 7:10 a.m.

Confirmation Cancel Confirm