Determine if new comment has been added
How would it be possible to determine if a new comment has been added?
simply making it mandatory with a precondition doesn't seem to work (and I need a custom error message anyway) so I was going for a Java extension.
And I'm guessing I must be kind of blind or something - but I can't seem to find how to determine if a comment has just been added with the current save operation or if it's an older comment.
Sorry if this is an obvious question and I'm just not seeing it. Hoping someone can help.
(using RTC 6.0.5 iFIx004 and using the built in comments attribute)
|
Accepted answer
One other answer
Ralph Schoon (63.7k●3●36●48)
| answered May 30 '18, 5:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited May 30 '18, 5:25 a.m. Hi Illona,
Comments
Ilona Krammer
commented May 30 '18, 6:00 a.m.
Sorry about the wrong definition of comments - I was thinking about the built in attribute list, but I am aware that comments are not an attribute.
I'd hoped there would be some information about a comment entry, like an id or something like that that may not be set immediately when the comment is saved.
I hoped I can get around comparing comment lists from the previous and the current states. But I guess I'll do that.
In case you have any other ideas - I'm all ears!
Ralph Schoon
commented May 30 '18, 6:46 a.m.
| edited May 30 '18, 6:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The object that represents the comment com.ibm.team.workitem.common.model.IComment
Ilona Krammer
commented Jun 06 '18, 2:04 a.m.
I found out that the new comment does not have an internal id yet - but accessing that property gives me an "discouraged access"
since there are lab pdfs that actually state that you can ignore those warnings - what are they for and what do they really mean?
This is more an Eclipse question, I think. The warning is based on which packages are configured as accessible in the plugin as far as I can tell. There is no mechanism to prevent you from doing the call as of today.
|
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.