cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Having an issue with Project which contains parentheses and cli

rlyvers
4-Participant

Having an issue with Project which contains parentheses and cli

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?

ACCEPTED SOLUTION

Accepted Solutions
awalsh
17-Peridot
(To:rlyvers)

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.

 

View solution in original post

1 REPLY 1
awalsh
17-Peridot
(To:rlyvers)

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.

 

Announcements


Top Tags