Can I search a custom attribute (small string) by contains a comma?
When I create a query in the web client (5.0.2) to search a custom string attribute, I select 'contains' and add a comma as the search value. It returns everything. I know the comma is a reserved special character so is there a way to escape it? or use a regex? Thanks
|
Be the first one to answer this question!
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.
Comments
Funny enough almost all signs except for comma(,) are escaped automatically. For example, you can search an attribute contains a double quote (").
In the past string attribute types were used to store enumeration lists as comma separated literal id's - hence not escaping them, I think.
Thanks, so is that a no then? We have used a small string attribute to store data from a migration. I need to check and see which work items contain multiple values which have been separated by a comma. Any workaround available?
You could use the Java API and read the attribute and use split to find ID's
Another idea would be a CSV export with a different delimiter and searching that.
Thank you very much. I did look at this route but didn't get very far (I'm a fairly novice java developer). Are there any sample classes i.e. one to authenticate and then maybe another to return some work items. If I had something to start with I'm sure I could tweak to suit our needs. Thanks!