Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

ClearQuest record field cannot be filled in using REST API OSLC 2.0

I am trying to prefill ClearQuest record fields by using REST API OSLC 2.0. There are fields that are enabled after entering a product (field). Some fields that become enabled are not pre-filled with REST API call, even though they are specified.

Example:
Let's say that we have the following fields: A, B, C, D, E, F. In order to fill in field E, field B has to be filled in/selected. 

I now send a REST call to /cqweb/oslc/repo/OUR_REPO/db/OUR_DB/record-type/16777221/creationDialog?dc%3Atype=Defect with JSON formatted data like:

{
    "prefixes":{
      "dcterms":"http:\/\/purl.org\/dc\/terms\/",
      "cq":"http:\/\/www.ibm.com\/xmlns\/prod\/rational\/clearquest\/1.0\/"
    },
   "dcterms:type":"Defect",
   "cq:A": "A_DATA",
   "cq:B":"B_DATA",
   "cq:C":"C_DATA",
   "cq:D":"D_DATA",
   "cq:E":"E_DATA",
   "cq:F":"F_DATA"
}

I get status "201, Created" back and a URL in the Location header, but field E is not filled in (while A, B, C, D,F are). E is cq:readOnly="true" first and then becomes cq:required:"true" when B is filled in.

Also, E is filled in when creating (not-prefilling) the record through REST API (URL:/ cqweb/oslc/repo/OUR_REPO/db/OUR_DB/record). 

Am i doing something wrong or is it a bug? Any possible solution to fill in the field?

0 votes



One answer

Permanent link
Not quite sure what do you mean "prefilling" in this context. When you use APIs, the interaction is completely different to the one when you use a browser.

The "creationDialog" URL should be used in a situation where you use a GUI - for example when you create a defect from within ClearTeam Explorer. This is not an "OSLC" API.

The second URL is the OSLC API. To ensure the fields are processed in the right order, follow the instructions in the below technote.
http://www-01.ibm.com/support/docview.wss?uid=swg21507620

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 480

Question asked: Feb 01 '16, 9:19 a.m.

Question was seen: 3,147 times

Last updated: Feb 01 '16, 6:13 p.m.

Confirmation Cancel Confirm