It's all about the answers!

Ask a question

File Against Category


Fatos Sopjani (1112) | asked Feb 06 '13, 1:11 p.m.
 Hi all, 

can someone please help me out with regards to getting the value of a selected category item for Filed Against attribute. 

I've managed to loop through all category items but what i am interested is only item has been selected by the user on the filed against category. 

thanks,
Fatos

3 answers



permanent link
sam detweiler (12.5k6195201) | answered Feb 06 '13, 1:44 p.m.
this returns a CategoryHandle

processing for variable=Filed Against attrib type=category kind=
                attribute id=category, type=category value=com.ibm.team.workitem.common.internal.model.impl.CategoryHandleImpl@1e5a5dc (stateId: [UUID _JZUkkFT4EeKUlbfIaeweIA], itemId: [UUID _JYca0lT4EeKUlbfIaeweIA], origin: com.ibm.team.repository.client.internal.TeamRepository@1706eb7, immutable: true)

this is the specific category handle.. so you need to resolve this object. to get its details loaded.

permanent link
sam detweiler (12.5k6195201) | answered Feb 06 '13, 3:40 p.m.
edited Feb 06 '13, 3:45 p.m.
doing this from a client.. I will add this to my sample code here
https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes

              ICategoryHandle ich = (ICategoryHandle)(attribute.getValue(auditableClient, workItem, null));
              ICategory ic = (ICategory) repository.itemManager().fetchCompleteItem(ich,
                            IItemManager.REFRESH, monitor); 
             System.out.println("Category name="+ic.getName());

Comments
Fatos Sopjani commented Feb 07 '13, 7:43 a.m.

Sorry for mybeginner level of RTC knowledge, I am looking to create a plugin, the workitem copy that i have would like to te get the value of filed against value selected by the user prior to saving the workitem. 


permanent link
sam detweiler (12.5k6195201) | answered Feb 07 '13, 10:16 a.m.
the methods have similar server side functions..

I posted source for a plugin a year ago that accessed similar data
https://jazz.net/forum/questions/64268/operation-advisor-custom-precondition-for-work-items

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.