It's all about the answers!

Ask a question

EWM OSLC Query Search for link(chengesets(remote)) exist on workitems, what kind of parameters should I set?

HIROAKI JOSAKO (47427) | asked Sep 27 '22, 10:27 p.m.

We are investigating how to search for work items with Changeset (Remote).
I'm trying to search for OSLC Query, but I don't know how to set the same conditions as "exist" in the "EWM query".
what kind of parameters should I set?

As a guess, when I executed it under the following conditions, I was angry that "the conditions cannot be NULL."
Curl: -H "Accept: application/rdf+xml" -H "OSLC-Core-Version: 2.0"!=""

    xmlns:oslc="" >
  <rdf:Description rdf:nodeID="A0">
    <oslc:message>Expected symbol: ", actual: null</oslc:message>
    <rdf:type rdf:resource=""/>

It worked in Firefox RestClient.

Accepted answer

permanent link
David Honey (1.8k17) | answered Sep 28 '22, 3:50 a.m.
edited Sep 28 '22, 5:16 a.m.
Hi Hiroaki san,

OSLC Query does not support queries for the existence or non-existence of properties.
You can query for work items and then post-process the returned RDF to find any members of interest that do [not] have a specified property.

There was a recent question on this topic that you might find helpful:

Best regards,
HIROAKI JOSAKO selected this answer as the correct answer

HIROAKI JOSAKO commented Sep 28 '22, 4:33 a.m.

Thank you
Is that so
It is a way to change the verification of verification whether the result when you write '! = "" Is as expected.

David Honey commented Sep 28 '22, 4:51 a.m. | edited Sep 28 '22, 5:13 a.m.

I don't understand your question. EWM is complaining about the syntax of the query expression you specified in the oslc.where parameter. One thing I notice is that you have not URL encoded that parameter value - you should do so. An unencoded query expression of oslc_cm:tracksChangeSet!="" is dubious for several reasons. The sematics of comparing against an empty string may not be well defined. That property would normally have a URI value, and URI values should be enclosed in <> angle brackets. See section 7.2.2 oslc.where syntax in

I think the only safe way is to omit that condition from the query expression, or omit oslc.where and then post process the results.

David Honey commented Sep 28 '22, 4:53 a.m.

I also note that you are not specifying and this means that the set of properties of work item members of the returned LDPC is undefined, and might even be an empty set. It might also change from release to release, so any client that is dependent on the default set of properties is potentially fragile.If you require specific properties of work items to be included in the response, you should specify them with

HIROAKI JOSAKO commented Oct 04 '22, 1:25 a.m. | edited Oct 04 '22, 1:32 a.m.

Thank you for the detailed explanation.
And I'm sorry, there was no explanation in the previous comment.
I'm sorry,my English is not good.

Write the results of the trial.

I also thought that it would not work after reading the "oslc.where" reference.
In the CURL, I got a 400 error as I asked.
However, using Firefox's Addon "RestClient" returned the query results.

So I decided to create script by VBA.
I thought it would be a 400 error.

sample: using MSXML2
header accept:application/rdf+xml,oslc-core-version 2.0

*don't URL encode

As a result, I confirmed that there was a response as expected.
    <rdf:type rdf:resource="" />

HIROAKI JOSAKO commented Oct 04 '22, 1:25 a.m. | edited Oct 04 '22, 1:33 a.m.

Of course I don't know why.
It has been confirmed that all the IDs of the target work items match in another way.
I don't believe in this result,
I would like to use this method to achieve this purpose by using this.

 I didn't know the importance of, and I happened to add it according to my purpose.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.