It's all about the answers!

Ask a question

How do I query RTC for work items that do *not* contain certain text?

Lisa Kay Trowbridge (132) | asked Sep 21 '16, 1:23 p.m.
 I understand the full text attribute and it's "okay" for finding work items that *do* contain certain strings of text.

However, I need to query the database for records that do not contain certain text and I'm not able to find a way to do that. I'm using RTC 6.0.1 and eclipse client.

Accepted answer

permanent link
Donald Nong (14.5k414) | answered Sep 22 '16, 2:28 a.m.
Have a look at how the full text search in RTC works. I doubt that you can execute a "not contain" operation.

Can you please elaborate your use case? Maybe other ways can be suggested once we know more about the use case.
Lisa Kay Trowbridge selected this answer as the correct answer

Lisa Kay Trowbridge commented Sep 22 '16, 10:22 a.m.

 When we have a CCB, we put CCB comments in the CR that always start with "CCB" so that we can query for them later. I want to find CRs that do not contain the string "CCB" in the comments so I can be sure we don't have open CRs that haven't been reviewed.

Donald Nong commented Sep 22 '16, 9:44 p.m.

It does not sound like a good approach, as you've already found out. I would consider three alternative options.
1. Add a custom attribute for this purpose. You can use an enumeration which contains a value "CCB Reviewed", so that you can select this value after reviewing the CR. In this case, it is quite easy to find CR with such attribute not equal to "CCB Reviewed".
2. If all the CR have to be reviewed, change the workflow so that it has a "Reviewed" state and CR has to go through such state.
3. Use the Review/Approval functionality.
(See figure 13)

Don Yang commented Sep 23 '16, 1:39 a.m.

Having a tag: CCB can be easier. then query tag does not contain 'CCB' 

Lisa Kay Trowbridge commented Sep 23 '16, 10:26 a.m.

 Thanks guys. I'm looking into implementing either the attribute or the tag, so at least you have affirmed this is probably the right way to go. :) Thank you for your answers.

Your answer

Register or to post your answer.