It's all about the answers!

Ask a question

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


Fabiano lima (17516) | asked Mar 30 '15, 2:50 p.m.
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?

Accepted answer


permanent link
Ralph Schoon (63.3k33646) | answered Mar 31 '15, 2:38 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Mar 31 '15, 2:46 a.m.
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

Comments
Fabiano lima commented Mar 31 '15, 8:07 a.m. | edited Mar 31 '15, 8:15 a.m.

 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 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.