[plain java] Adding Timesheetentry to query?
I want to use Plain Java API query workitems with Timesheetentry.
I used the following source, but it not work.(error).
source:
String strTimesheet = ModelPackage.eINSTANCE.getTimeSheetEntry().getName();
IQueryableAttribute timesheetAttribute= queryableAttributeFactory.findAttribute(projectArea, strTimesheet, auditableClient, progressMonitor);
AttributeExpression timesheetExpression= new AttributeExpression(timesheetAttribute, AttributeOperation.EXISTS, projectArea);
expression.add(timesheetExpression);
I think that Timetracking(TimeSheetEntry) is not an attribute? How to do it? Could anyone help me to resolve it?
Accepted answer
No it isn't it is a different object with a relationship. See https://rsjazz.wordpress.com/2015/03/31/the-work-item-time-tracking-api/ . I haven't tried to use these in queries, so you will have to find this out on your own. I have not been very successful with queries across relationships. A lot of questions you would like to ask lack a query mechanism that would allow to answer them.