It's all about the answers!

Ask a question

[plain java] Adding Timesheetentry to query?


guoping chen (19913) | asked May 09 '16, 9:12 p.m.

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


permanent link
Ralph Schoon (55.5k23642) | answered May 10 '16, 2:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.
guoping chen selected this answer as the correct answer

Your answer


Register or to post your answer.