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

Was modified attribute value in Workitem that isn't mapped this attribute

recently, I created a Script for modify the values in custom attributes, informing the Work Item ID, but I informed an ID of task, the Script changed the attribute value in Workitem that isn't mapped this attribute. It's an error? My Script not verify the workItem type, but the RTC shouldn't verify if the custom attribute exists to the workItem before change?

0 votes


Accepted answer

Permanent link
It is unclear to me what you mean with "Creating a Script" because there is no officially supported scripting tool for work items, I am aware of. You can use the OSLC or the Java API for such purposes. Or use community provided tools such as https://rsjazz.wordpress.com/2015/02/27/a-rtc-workitem-command-line-version-2-2/ .

If you do and tell such a solution to update an attribute of a work item located by ID, then it will update the attribute, if it is available. It won't care for the type of the work item. You would have to make sure to put in some logic to check the type and avoid this.

If the attribute is there, e.g. because it was originally of a type that has the attribute it will update it. The Java API can also create the attribute if it wasn't there e.g. using workItem.addCustomAttribute().

I don't know about the OSLC API. However, I would assume in any case, using automation, you are responsible that it works as you desire.
Fabiano lima selected this answer as the correct answer

0 votes

Comments

 Hi Ralph, thanks for your response. When I say "Creating a Script" I refer the creation of code JAVA using API Libs of RTC. But your explanation was clear.

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,954

Question asked: Mar 30 '15, 2:50 p.m.

Question was seen: 2,603 times

Last updated: Mar 31 '15, 8:15 a.m.

Confirmation Cancel Confirm