It's all about the answers!

Ask a question

why using RTCWCL cannot update for custom attribute ?


Lusong Hou (132) | asked May 10, 4:53 a.m.
edited May 10, 4:56 a.m.
hi,

I have an custom attribute added in RTC and its ID is DevelopmentBranch, however, RTCWCL cannot update it and threw an exception that the attribute is not avaiable.
"Exception! Attribute not available at work item: DevelopmentBranch Value: 'testInput'"
But if I manually give it a value and save it in RTC website, then running the WCL command can pass without any issue.
Anyone know what is the problem ?






c:\RTCWCL\wcl>wcl -update /ignoreErrors repository="xxxxxxx" user=xxxxx password="xxxxx" id=800947 DevelopmentBranch="testInput"

c:\RTCWCL\wcl>set JAVA_HOME=..\TeamConcert\jdk

c:\RTCWCL\wcl>set PLAIN_JAVA=../PlainJavaAPI

c:\RTCWCL\wcl>..\TeamConcert\jdk\jre\bin\java -Dhttp.proxyHost=xxxxxx -Dhttp.proxyPort=3128 -Djava.security.policy=rmi_no.policy -Djava.ext.dirs=./lib;../PlainJavaAPI;..\TeamConcert\jdk/jre/lib/ext -cp ./lib;../PlainJavaAPI -jar wcl.jar -update /ignoreErrors repository="xxxxxx" user=xxxxxx password="xxxxxx" id=800947 DevelopmentBranch="testInput"
StartTime: May 9, 2024 9:41:58 AM
WorkItemCommandLine Version 6.0

Starting Team Platform ...
Executing command: update

Updating work item 800947.
Exception! Attribute not available at work item: DevelopmentBranch Value: 'testInput'. Check the work item type or consider synchronizing the attributes.
Ignored.......
Updated work item 800947.

Success!

EndTime: May 9, 2024 9:42:08 AM

Accepted answer


permanent link
Ralph Schoon (63.3k33646) | answered May 10, 5:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

If you create a custom attribute, it is not automatically added to existing work items. There is a special UI action that you need to perform for this this is called synchronize attributes. WCL does not automatically add the attribute, if it does not exist at the work item hence it says

Updating work item 800947.
Exception! Attribute not available at work item: DevelopmentBranch Value: 'testInput'. Check the work item type or consider synchronizing the attributes.


Lusong Hou selected this answer as the correct answer

Comments
Lusong Hou commented May 10, 5:10 a.m.

Thank you very much for your suggestions.

Could you please let me know the guidlines about how to synchronize attributes from UI ?


Ralph Schoon commented May 10, 6:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

When you open the EWM documentation (Library>Engineering.....) select EWM and your version, type "Synchronize Attributes" in the search field and then search you get this: https://www.ibm.com/docs/en/SSUC3U_7.0.3/ewm/com.ibm.team.workitem.doc/topics/t_updating_custom_attributes.html .

When you add custom attributes in the web UI, the editor provides you with a button to check usage of the attribute and also allows you to select to add it to all work items that do not have it. 

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.