Java Server Side : How check if a comment has been add
Hello,
I'm coding a java plugin and i would like to know how check if a comment has been add during the saving...
Thanks for your help ?
Antoine
|
Accepted answer
Hi Antoine,
I have code that adds a comment to a work item. I've poked around it, and it looks like you could do something like the following before saving the work item with a new comment: IComments comments= workItem.getComments(); int numberOfComments = comments.getContents().length; Then after you save the work item, you could check that contents[numberOfComments].toString() is your comment. I don't have an environment setup to see if getContents() is returning what I expect it will, so hopefully that will work for you (or at least get you started). Antoine LELEU selected this answer as the correct answer
|
One other answer
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.