Skip to main content
1-Visitor
May 20, 2013
Question

Subquery CLI and queryDefinitionFile sample

  • May 20, 2013
  • 1 reply
  • 2249 views

Hi guys,

Do you have support for creating a subquery or filter in CLI?

My current problem is as follows:

- I have a query that lists all open issues of several projects. Now I want to add a subquery or filter to list all open issues created in a specific period.

Also, I would like ask for a sample of a queryDefinitionFile. I tried using a txt file but it will result to an error.

Please advise.

Thanks

    1 reply

    16-Pearl
    May 21, 2013

    The easiest way to "learn" the correct use of the CLI is:

    1. create the query you want (including your extra filters for a sample time frame ) using the client gui and store this one as a named query.

    2.use the CLI to view the named query and pipe the output into a txt file.

    3. extract the query definition from the txt fiel and use it for your own CLI create/run query command

    HTH Matthias

    BTW:

    In my experience with the CLI query deifinition Integrity is very picky when it comes to date formats.

    Maybe this might be the root cause for your problems.

    jdcc1-VisitorAuthor
    1-Visitor
    May 21, 2013

    Hi Matthias,

    I found an issue with the CLI parsing with MKS 2009. I have a Project Title that mistakenly had double space on its string name. When I view the named query the project

    Actual in MKS - Project 06.00.00 - 6235 (take note of the double space before -)

    Text generated by viewquery - Project 06.00.00 ÿ- 6235 (the extra space was replaced by ÿ)

    Please advise on what to do with this. I am not an administrator of our system so I cannot update the Project Title.

    Thanks

    16-Pearl
    May 21, 2013

    2 ideas:

    1. - try using quotes around your project name in the command line, or try some DOS escape characters like ^ to solve this.

    or

    2. - (my favorite) contact your Integrity Admin about this unfortunate project naming to get it changed.

    Avoiding any SPACES is always a best practice when it comes to the CLI.