Trouble creating a custom profile (Work Item Profile)
Goal is a custom profile, based on an existing profile as found in IWorkItem, so that the custom profile has an extra attribute - a custom attribute.
I've tried this - but it fails: String ATTR_INTERNAL2EXTERNAL = "ATTR_AI1f"; The attribute id hardcoded in the logic is known to the project area, but that does not seem to be the issue. The createExtension fails an assertion deep in the ItemProfile code:
The properties at this point are: That seems to be IWorkItem.SMALL_PROFILE and my custom attribute id; why must all those known to the helper exist? Given the goal - Is this the wrong approach or a bug? Pat Mc. |
2 answers
Hi,
ItemProfile is not aware of custom attributes, but only of the lower-level hard-coded properties of an item type. If you want to retrieve custom attributes you can extend an existing profile like: ItemProfile<IWorkItem> customProfile= IWorkItem.SMALL_PROFILE.createExtension(IWorkItem.CUSTOM_ATTRIBUTE_PROPERTIES); That will retrieve all custom attributes, but there is currently no finer grained way of doing this. Christof Jazz Work Item team |
That seems to be IWorkItem.SMALL_PROFILE and my custom attribute id; When including custom attributes in an ItemProfile, you must also include the attributes from IWorkItem.CUSTOM_ATTRIBUTE_PROPERTIES. HTH, 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.