AnsweredAssumed Answered

Querying all comments on a task

Question asked by mhanrahan on Jul 19, 2017

Hi,

When trying to query a for all of the comments on a task, I am unable to retrieve any comments that have a different/custom type unless I do a separate query.

 

I had a look at the source code and found the queries.

 

If I don't supply a type, it uses the query:

select *
from ${prefix}ACT_HI_COMMENT
where TASK_ID_ = #{parameter,jdbcType=VARCHAR}
  and TYPE_ = 'comment'
order by TIME_ desc

If I do supply a type, it uses the query:

select *
from ${prefix}ACT_HI_COMMENT
where TASK_ID_ = #{taskId,jdbcType=VARCHAR}
   and TYPE_ = #{type,jdbcType=VARCHAR}
order by TIME_ desc

So I suppose my question is, is there a way to get all of the comments for a task ID regardless of type?
I'm willing to filter out the 'event' entries manually if need be.

Outcomes