It's all about the answers!

Ask a question

Programmatically setting the "Filed Against" attri


Ann Griffiths (145) | asked Mar 14 '12, 11:50 a.m.
I have a custom work item which contains the standard tabs for Overview, Approvals, Links, and History with the standard attributes on those tabs. I was trying to programmatically set the value of the "Filed Against" attribute. My code was calling the WorkItemCommon.findAttribute method to find the attribute based on the attribute's identifier. I looked up the ID of the Filed Against attribute in my custom work item and it was com.ibm.team.workitem.attribute.category, so that was the identifier that I was trying to use in the findAttribute method. The attribute could not be found. So, I used the debugger to view all of the attribute identifiers that were being looped through and there was no attribute identifier of com.ibm.team.workitem.attribute.category, but there was one of just category. So, I tried that and it worked. But, I'm curious why category is the attribute identifier when that isn't what is listed when I look at the attributes for the work item in the project configuration data.

2 answers



permanent link
Kim Soederhamn (1.5k34348) | answered Mar 27 '12, 8:50 a.m.
I have a custom work item which contains the standard tabs for Overview, Approvals, Links, and History with the standard attributes on those tabs. I was trying to programmatically set the value of the "Filed Against" attribute. My code was calling the WorkItemCommon.findAttribute method to find the attribute based on the attribute's identifier. I looked up the ID of the Filed Against attribute in my custom work item and it was com.ibm.team.workitem.attribute.category, so that was the identifier that I was trying to use in the findAttribute method. The attribute could not be found. So, I used the debugger to view all of the attribute identifiers that were being looped through and there was no attribute identifier of com.ibm.team.workitem.attribute.category, but there was one of just category. So, I tried that and it worked. But, I'm curious why category is the attribute identifier when that isn't what is listed when I look at the attributes for the work item in the project configuration data.


I have an idea that some attributes might be kind of "virtual" eg they are derived from other fields when displayed - even for editing. think of the time remaining/time spent fields for instance or the category you mention which is based on team mappings to categories.

permanent link
Geoffrey Clemm (30.1k33035) | answered Mar 27 '12, 9:38 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
"com.ibm.team.workitem.attribute.category" is the ID of Filed Against attribute, soI don't know why that wasn't showing up in your
debug window.

Cheers,
Geoff

I have a custom work item which contains the standard tabs for Overview, Approvals, Links, and History with the standard attributes on those tabs. I was trying to programmatically set the value of the "Filed Against" attribute. My code was calling the WorkItemCommon.findAttribute method to find the attribute based on the attribute's identifier. I looked up the ID of the Filed Against attribute in my custom work item and it was com.ibm.team.workitem.attribute.category, so that was the identifier that I was trying to use in the findAttribute method. The attribute could not be found. So, I used the debugger to view all of the attribute identifiers that were being looped through and there was no attribute identifier of com.ibm.team.workitem.attribute.category, but there was one of just category. So, I tried that and it worked. But, I'm curious why category is the attribute identifier when that isn't what is listed when I look at the attributes for the work item in the project configuration data.


I have an idea that some attributes might be kind of "virtual" eg they are derived from other fields when displayed - even for editing. think of the time remaining/time spent fields for instance or the category you mention which is based on team mappings to categories.

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.