Updating work item using Rest API (HttpPut) is not working!
Hi, I am working on updating a workitem status / description using Rest APIs(HttpPut). I am following the steps detailed in the OSLC Workshop book. Below is the code snippet. But some how work item is not getting updated after executing the code. I am using JTS 4.0.1.
private void updateChangeRequest(String usrName, String password, String paName, String wiID, String status, String description)
private HttpResponse updateChangeRequest(final ChangeRequest cr, String server,String login, String password, HttpClient httpclient) throws InvalidCredentialsException, IOException {
HttpEntity entity = new EntityTemplate(cp);
Anyone has faced similar challenges & was able to resolve it, please let me know.
|
One answer
do you get any error, if no, what is the response (status code, header and body) you receive.
one check you can do is to print the URL fetched for the work item id and use that URL in browser or REST client to verify if the work item is fetched correctly. I would use below code to do that : system.out.println("URL for " + wiID + " is : " + cr.getUri()); system.out.println("Existing Description " + cr.getDcDescription()); Comments
Guru Prasad Rao K P
commented Jun 06 '13, 8:12 a.m.
Thanks for the quick reply. Here is what I get when I sysout. cr.getUri()==https://localhost:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/6 & the description is the latest one which I have set.
Guru Prasad Rao K P
commented Jun 06 '13, 8:13 a.m.
*******************
the response header with
Guru Prasad Rao K P
commented Jun 28 '13, 3:28 a.m.
Hi, I am now getting 'HTTP/1.1 409 Conflict - Illegal Value' error. Can you please advise? |
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.