It's all about the answers!

Ask a question

How to Create Expression for Field Against attribute using Java API


Navin R S (138) | asked Nov 24 '17, 5:03 a.m.
edited Nov 24 '17, 5:05 a.m.

Exception in thread "main" java.lang.IllegalArgumentException: Argument must be an instance of IAuditableHandle
    at com.ibm.team.workitem.common.internal.model.SetAttributeType.toString(SetAttributeType.java)
    at com.ibm.team.workitem.common.internal.expression.AttributeValueFactory$ConstantValue.saveState(AttributeValueFactory.java)
    at com.ibm.team.workitem.common.expression.AttributeExpression.saveValueProxy(AttributeExpression.java)
    at com.ibm.team.workitem.common.expression.AttributeExpression.saveState(AttributeExpression.java)
    at com.ibm.team.workitem.common.expression.Term.saveState(Term.java)
    at com.ibm.team.workitem.common.internal.expression.XMLExpressionSerializer.serialize(XMLExpressionSerializer.java)
    at com.ibm.team.workitem.common.internal.expression.XMLExpressionSerializer.serialize(XMLExpressionSerializer.java)
    at com.ibm.team.workitem.common.internal.query.impl.QueryDescriptorCustomImpl.setExpression(QueryDescriptorCustomImpl.java)
    at com.ibm.team.workitem.common.internal.query.impl.QueryDescriptorCustomImpl.setExpression(QueryDescriptorCustomImpl.java)
    at com.ibm.team.workitem.common.internal.query.QueryCommon.createQuery(QueryCommon.java)
    at com.ibm.team.workitem.common.internal.query.QueryCommon.getResolvedExpressionResults(QueryCommon.java)

One answer



permanent link
Ralph Schoon (56.8k23642) | answered Nov 24 '17, 5:21 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

See https://jazz.net/forum/questions/244541/how-to-create-expression-for-planned-for-attribute-using-java-api/244553

Also on of the examples of questions that fall into the "to be ignored" category based on the lack of useful information in the question. Learn here: How should I ask a question in the Forum if I want to receive useful answers?


Comments
Ralph Schoon commented Nov 24 '17, 5:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

It is basically the same problem and same approaches apply. You can't pass a string, you have to find the category. Tons of examples for this kind of stuff here: https://rsjazz.wordpress.com/

You can also  use Google on this site. This question has been answered before here.

Your answer


Register or to post your answer.