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

Relationship in querydefinition not possible

SOLVED
Highlighted
Participant

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
Highlighted

Re: Relationship in querydefinition not possible

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
Highlighted

Re: Relationship in querydefinition not possible

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

Highlighted

Re: Relationship in querydefinition not possible

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

Announcements