It's all about the answers!

Ask a question

Can I search a custom attribute (small string) by contains a comma?


Sian O'Briain (351021) | asked Sep 10 '15, 4:45 p.m.
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

Comments
1
Donald Nong commented Sep 11 '15, 6:19 a.m.

Funny enough almost all signs except for comma(,) are escaped automatically. For example, you can search an attribute contains a double quote (").


1
Ralph Schoon commented Sep 11 '15, 7:11 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

In the past string attribute types were used to store enumeration lists as comma separated literal id's - hence not escaping them, I think.


Sian O'Briain commented Sep 15 '15, 5:44 p.m.

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?


1
Ralph Schoon commented Sep 16 '15, 3:37 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


Sian O'Briain commented Sep 16 '15, 9:16 a.m.

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!

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.