Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes



2 answers

Permanent link
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.

0 votes


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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 14 '12, 11:50 a.m.

Question was seen: 5,289 times

Last updated: Mar 14 '12, 11:50 a.m.

Confirmation Cancel Confirm