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

Having an issue with Project which contains parentheses and cli

SOLVED
Highlighted
Visitor

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?

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Having an issue with Project which contains parentheses and cli

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.

 

1 REPLY 1

Re: Having an issue with Project which contains parentheses and cli

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.