It's all about the answers!

Ask a question

how to query small string customized attribute?


Peterson dos Santos (3927) | asked Apr 25 '22, 4:07 p.m.
edited Apr 25 '22, 4:09 p.m.
Hi Friends,

I created a customized attribute, type small string named "siglaSistema" but the query by this attribute broken

Here is the code:

WorkItemQueryModel model= WorkItemQueryModel.ROOT;
IItemQuery query= IItemQuery.FACTORY.newInstance(model);
IPredicate predicate = model.workItemType()._eq("FRM");
predicate = predicate._and(model.projectArea()._eq(projectArea));
predicate = predicate._and(model.stringExtensions().key()._eq("frm_classe_req_mudancas"))._and(model.stringExtensions().value()._eq("frm_classe_req_mudancas.literal.l6"));
predicate = predicate._and(model.stringExtensions().key()._eq("siglaSistema"))._and(model.stringExtensions().value()._eq((siglaSistema)));
predicate = predicate._and(model.internalState()._eq(wiDto.getAttributeValue()));

Am I doing somethng wrong?

Thank you for any help

Regards!



One answer



permanent link
Ralph Schoon (63.1k33645) | answered Apr 26 '22, 3:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 I have no experience with using the query model for querying work items. I usually used the expressions and work item queries. See https://rsjazz.wordpress.com/2012/11/19/using-expressions-for-automation/ and https://rsjazz.wordpress.com/2012/10/29/using-work-item-queris-for-automation/ .

Your answer


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