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

id for "Filed Against" field in workitem

Hello,
I need to write a script that depends on the value of the "Filed Against" field in a workitem. What is the id for the field "Filed Against"?

Thanks in advance for your help.

0 votes



5 answers

Permanent link
Hello,
I need to write a script that depends on the value of the "Filed Against" field in a workitem. What is the id for the field "Filed Against"?

Thanks in advance for your help.


File Against is also called Category. So you can use the attribute id: IWorkItem.CATEGORY_PROPERTY . Or simple get its values with IWorkItem.getCategory() method.



/**
* Returns the 'filed against' category.
*
* @return the 'filed against' category
* @see com.ibm.team.workitem.common.IWorkItemCommon#resolveHierarchicalName(ICategoryHandle, org.eclipse.core.runtime.IProgressMonitor)
*/
ICategoryHandle getCategory();

0 votes

Comments

Hi, 


How do i get a selected item of Filed Against rather than the whole category, can i just get the value of filed against selected? 

Thanks,
fatos 


Permanent link
Thanks for the quick reply. I'm writing a workitem Attribute Value Providers using Javascript not Java
I need to make my custom attribute depends on the selection of the "Filed Against" attribute. Something like this referencing the id of the Filed Against

 <attributeDefinition>

<dependsOn>
<valueSetProvider>
</attributeDefinition>


Is the id "category" ?

Thanks

0 votes


Permanent link
Thanks for the quick reply. I'm writing a workitem Attribute Value Providers using Javascript not Java
I need to make my custom attribute depends on the selection of the "Filed Against" attribute. Something like this referencing the id of the Filed Against

 <attributeDefinition>

<dependsOn>
<valueSetProvider>
</attributeDefinition>


Is the id "category" ?

Thanks



Add this to your javascript and then after it runs look at the Eclipse log for the id of the Filed Against value you selected in your work item.

var filed = workItem.getValue(WorkItemAttributes.FILED_AGAINST);
console.log(filed);

0 votes


Permanent link
Hi

I am trying to implement same Javascript
but using :

var filed = workItem.getValue(WorkItemAttributes.FILED_AGAINST);
console.log("result:" + filed);

I got DBid of the selected category something like:
MESSAGE LOG: result: _gJW_cKrNEeCbw-akxBvZlA

I would like to return the string value of this category.
Do you know how ?

Thx for help

0 votes


Permanent link
Hi

I am trying to implement same Javascript
but using :

var filed = workItem.getValue(WorkItemAttributes.FILED_AGAINST);
console.log("result:" + filed);

I got DBid of the selected category something like:
MESSAGE LOG: result: _gJW_cKrNEeCbw-akxBvZlA

I would like to return the string value of this category.
Do you know how ?

Thx for help


I have not heard of a way. I ended up just using the id value in my logic, similar to using the id for the owner field.

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
× 10,948

Question asked: Jul 07 '11, 10:24 a.m.

Question was seen: 5,507 times

Last updated: Feb 06 '13, 10:06 a.m.

Confirmation Cancel Confirm