id for "Filed Against" field in workitem
5 answers
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();
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
Is the id "category" ?
Thanks
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
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);
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 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
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.