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 the Community Ranking System, a fun gamification element of the PTC Community. X

Relationship in querydefinition not possible

sziel
5-Regular Member

Relationship in querydefinition not possible

Hi,

I'm trying to create a query with a relationship. But it fails and have no idea why.

The command with error message:

im createquery --name=newQ --queryDefinition=((relationship["ID"] backwards forwards using ["Release"] = 3310308) and (field["Type"] = "Sprint"))
You may not supply operands (a selection) to: createquery

I have the same query defined in the GUI:

im viewquery SpecificSprint
...
Query Definition: ((relationship["ID"] backwards forwards using ["Release"] = 3310308) and (field["Type"] = "Sprint"))
Sorted By: ID (Descending)
Fields: ID,Type,Summary,State,Team,Sprint Scrum Master,Estimated Velocity,Sprint End Date,Sprint Start Date,Project
-----------------------

 And that one is working on the command line:

im issues --query=SpecificSprint
3310312 Sprint Scheduled [XB1061A][R1024.0_V10] XB1061A Integration Sprint 0

So how can I specify that query on the command line 🤔

1 ACCEPTED SOLUTION

Accepted Solutions
pmaechtlen
17-Peridot
(To:sziel)

You must encase the Querydefinition in quotes, otherwise the commandline will not understand that this is a single argument and break it at every space.
Try:
im createquery --name=newQ --queryDefinition='((relationship["ID"] backwards forwards using ["Release"] = 3310308) and (field["Type"] = "Sprint"))'

View solution in original post

2 REPLIES 2
pmaechtlen
17-Peridot
(To:sziel)

You must encase the Querydefinition in quotes, otherwise the commandline will not understand that this is a single argument and break it at every space.
Try:
im createquery --name=newQ --queryDefinition='((relationship["ID"] backwards forwards using ["Release"] = 3310308) and (field["Type"] = "Sprint"))'

sziel
5-Regular Member
(To:pmaechtlen)

Thanks! For some reason I could not see the issue 😅

Top Tags