Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
So I have a project which has parenthesis in it, and I am trying to execute a query from the command line constructed from a query definition.
Here is a Query defined which has the same query definition:
Name: frl-Test
...
Query Definition: ((field["Summary"] contains "#29") and (field["Type"] = "Sprint") and (field["Project"] = "/Electronic Tools (ETPL)/Foobar"))
Sorted By: ID (Ascending)
Fields: ID,Type,Summary,State,Assigned User,Project
Here is the issue I receive when I enter the query defined for the issues cli interface.
im issues --queryDefinition="((field[Summary] contains ""#29"") and (field[Type] = ""Sprint"") and (field[Project] = ""/Electronic Tools (ETPL)/Foobar""))"
*** MKS124814: Cannot show view information: A "(" was found within a ( ) group. Error occured before "ETPL)/Guidanz))"
I have tried escaping the parentheses with a backquote (`), and this did not help the situation. Can I just not have a parentheses in the name?
Solved! Go to Solution.
The trick is to use single quotes around the entire query definition and double quotes for the field names and values. For example:
im issues --queryDefinition='((field[Type]="Work Item") and (field[Project]="/My (Test) Project"))'
This is also documented in article 171843.
The trick is to use single quotes around the entire query definition and double quotes for the field names and values. For example:
im issues --queryDefinition='((field[Type]="Work Item") and (field[Project]="/My (Test) Project"))'
This is also documented in article 171843.