Programmatically setting the "Filed Against" attri

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

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.

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