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

Creation and deletion of RTC work item tags witn API

Hi everybody!
Could somebody help me with API for creation and deletion the tags in Rational Team Concert? Is it possible?
I'm wondering for any information about API both at the server side in a typical follow-up action extension and with REST API.
Thank you very much in advance for any recommendations and references!

0 votes


Accepted answer

Permanent link
For the Java API - regardless if client or server, it should work like this:
IWorkItem workItem = workingCopy.getWorkItem();
List tags = workItem.getTags2();
tags.add("NewTag");
workItem.setTags2(tags);

In the REST API I would expect you have to just add a new tag to the list and save the resource with all the data.

I have not tested the code, but it is analogue to several other cases. You would save the work item with the usual means e.g. using the operation pattern or work item save on client or server.
Dmitry A. Lesin selected this answer as the correct answer

0 votes

Comments

As for REST API, I was able to successfully update a work item with tags. Next, I put the excerpts from log:

Started updating a workitem with ID=130
Sending HTTP request to server:
  Method: PUT
  URL: https://<SERVER_NAME>:9443/ccm/oslc/workitems/130?oslc_cm.properties=dc:title,dc:subject
  Headers: [Content-type=application/x-oslc-cm-change-request+xml, Accept=application/x-oslc-cm-change-request+xml]

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
× 10,936
× 478
× 411
× 24

Question asked: Oct 08 '14, 8:15 a.m.

Question was seen: 5,265 times

Last updated: Nov 22 '14, 2:24 a.m.

Confirmation Cancel Confirm