Seeting default value for Workitem custom attribute
![]()
Hello,
I'm creating a custom attribute for a workitem as follow. How can I set its value? Thank you for your help.
|
One answer
![]() I'm creating a custom attribute for a workitem as follow. How can I Here's the corrected version of your code: // Create an attribute of type small string IAttribute attribute = getWorkItemClient().createAttribute(projArea, "com.yourcompany.attribute.test", AttributeTypes.SMALL_STRING, "Test Attribute", monitor); // Express that this attribute is part of the work item workItem.addCustomAttribute(attribute); // Set a value for this attribute workItem.setValue(attribute, "Some value"); If you are interested in configuring default values for attributes, please take a look at: https://jazz.net/wiki/bin/view/Main/AttributeValueProviders -- Regards, Patrick Jazz Work Item Team |
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.