Hi Stephen, I will be surprised if you get any results back with that query. I am fairly sure that the case matters. The format of the query will give you an 'Invalid Query" error message back, but the wrong field names just gives you nothing.
Please let me know if I am wrong.
------------------------------
Nik
Ask me a question, I'm All Ears!
Rally Sales Engineer
Rally Software
------------------------------
Original Message:
Sent: 06-18-2020 09:48 PM
From: Stephen Wingert
Subject: Web Services Query Issue
Sorry... the query was
query = ((parent.formattedid = "B39") or ((parent.formattedid = "B40") or (parent.formattedid = "B42")))
Original Message:
Sent: 06-18-2020 09:44 PM
From: Stephen Wingert
Subject: Web Services Query Issue
Nik...thanks for the reply. The change in case did not help. A colleague suggested changing the order of the parentheses... this works...
query = ((parent.formattedid = "B39") and ((parent.formattedid = "B40") and (parent.formattedid = "B42")))
Original Message:
Sent: 06-18-2020 11:33 AM
From: Nik Antonelli
Subject: Web Services Query Issue
Hi Stephen,
The API calls are case sensitive. If you use Parent.FormattedID, it might work. The exact field names are in the online docs here: https://rally1.rallydev.com/slm/doc/webservice/
------------------------------
Nik
Ask me a question, I'm All Ears!
Rally Sales Engineer
Rally Software
Original Message:
Sent: 06-18-2020 10:59 AM
From: Stephen Wingert
Subject: Web Services Query Issue
I am querying for MBIs (a Portfolio item) and I keeps getting errors about the query parameter. I cannot see any issues with it. Could someone help out with the debug? If I apply the same query to the custom list app in a dashboard, it works just fine. If I remove the query parameter, i get results back (no errors).
Web Serivces Call:
https://rally1.rallydev.com/slm/webservice/v2.0/portfolioitem/mbi?project=https://rally1.rallydev.com/slm/webservice/v2.0/project/30774269735&query=((parent.formattedid%20=%20%22B39%22)%20or%20(parent.formattedid%20=%20%22B40%22)%20or%20(parent.formattedid%20=%20%22B42%22))&fetch=true&order=FormattedID&start=1&pagesize=2000 [rally1.rallydev.com]
Isolated query parameter (for ease of reading):
query = ((parent.formattedid = "B39") and (parent.formattedid = "B40") and (parent.formattedid = "B42"))
Response:
{"QueryResult": {"_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "Errors": ["Could not parse: Error parsing expression -- expected \")\" but saw \"or\" instead."], "Warnings": [], "TotalResultCount": 0, "StartIndex": 0, "PageSize": 0, "Results": []}}
------------------------------
Thanks,
Steve :)
------------------------------