Programmatically Query in RTC for Multiple ID Attributes
Hello Team,
I want to build query in RTC like how i create in Web,
for example i have 3 workitems which i want to query, i give in web id is 1000,1002,1003 like this.
Could you please suggest how can i get above behaviour programatically,
Below is code,
QueryableAttribute idAttribute = QueryableAttributes.getFactory(IWorkItem.ITEM_TYPE).findAttribute(projectArea,
IWorkItem.ID_PROPERTY, auditableCommon, monitor);
// Creating an Expression
String data = "1000,1001";
Expression idExpression = new AttributeExpression(idAttribute, AttributeOperation.EQUALS, data);
Thanks
2 answers
I don't see this as a capability in the Query UI, so I don't see how it should be done with an expression. If you refer to full text search, you would have to use it in the expression.
Comments
Actually why i require this,
i want get Code review findings. For this to achieve we have below SCM CLI
SCM -Codereview [Queryid]
Therefore i am creating query with all workitems and then pass it to SCM CLI to get Code review findings.
I am getting tired from users that are not professional enough to even provide something remotely to their question (see:; How should I ask a question in the Forum if I want to receive useful answers? ) and then come up with the real question piece by piece. I am out f here. Good luck with your question.
Usecase:
Generate report with review findings for Snapshot.
I see only using SCM CLI
Usage: scm export code-review [options] <queryId><outputFile>
Therefore We are following below algorithm
Algorithm currently being followed is:
1. Get Workitems from Snapshots.
2. Build Query programmatically with the Workitems found from snapshot.
3. Pass same queryid and get the Review findings.
Currently we are at step 2 where in which i want to create query programmatically with more no of workitems id.
Could you help now?
Comments
vinitha dsouza
Oct 16 '17, 7:22 a.m.Hello Team,
Can anyone of you answer this query?