It's all about the answers!

Ask a question

Query: is/contains/starts with: getting different results - how do they work?


Ilona Krammer (159549) | asked Nov 04 '16, 7:13 a.m.
I am looking for work items where a linked work item has an attribute with a certain value.
I am therefore creating a query filtering by type and then by the attribute and using "is" and I'm entering the attribute value I'm looking for
-> I am getting 3 work items as a result which is great

I am switching from "is" to "starts with"
--> I am not getting anything as a result

I am switching to "contains"
--> I am not getting any result

Why is that? How does that filter work? It doesn't really seem to follow the logic it is implying with the keywords starts with/contains

Thank you very much in advance!

Comments
Donald Nong commented Nov 06 '16, 6:56 p.m.

You failed to mention the type of the attribute of concern. What is it?


Ilona Krammer commented Nov 07 '16, 12:28 a.m. | edited Nov 07 '16, 12:28 a.m.

I fail to see the logic in the search results in general - I would hope that the "logic" isn't dependent on the kind of attribute I use (though RTC already managed to "suprise" me in a lot of ways, especially with queries and searches....)

In that case it is a medium string and a custom attribute


Donald Nong commented Nov 07 '16, 12:46 a.m.

The confusion that I have is that you used the operator "is". Probably I haven't tried hard enough, I just can't see this operator with string type. In my own testing, "starts with" and "contains" work as expected.


Ilona Krammer commented Nov 07 '16, 12:48 a.m.

Actually I'm searching for a medium string in a linked work item (custom linktype). Does that make a difference?


Donald Nong commented Nov 07 '16, 1:04 a.m.

It should not. It works as expected for me no matter the attribute is in the base WI or the linked WI. What version of RTC are you using and what operators are available with the Medium String attribute?


Ilona Krammer commented Nov 07 '16, 1:08 a.m.

I'm getting
contains / does not contain
starts with / ends with
is / is not
exists

We are using RTC 6.0.2


Donald Nong commented Nov 07 '16, 8:26 p.m.

The reason I did not see the "is" operator is that I mistakenly used the Medium HTML type for testing. Once I changed to Medium String, I got the same operators. But they all work as expected - the result set "contains" >= "starts with" >= "is".

showing 5 of 7 show 2 more comments

Be the first one to answer this question!


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.