I need to search for all comments/annotations to which there is a reply.
I have a script that searches for comments with a given content
{{velocity}} #set($q1 =$services.query.xwql("select distinct doc.fullName from Document doc, doc.object(XWiki.XWikiComments) com WHERE com.comment LIKE :value "))
Hello, you can check the xproperties available in the XWiki.XWikiComments xclass by checking https://<yourserver>/xwiki/bin/view/XWiki/XWikiComments in your XWiki instance.
The replyto xproperty could be used to do what you need I think.
Hi,
I know the comment is a reply to another comment but I don’t know how to find out which comment is the previous one.
ReplyTo doesn’t resolve my problem becouse I have only information that this is a comment with a reply…
my properties from comment object
<property><date>Fri Jun 16 15:08:36 CEST 2023</date></property>
<property><highlight></highlight></property>
<property><selection></selection></property>
<property><selectionLeftContext></selectionLeftContext></property>
<property><author>XWiki.Test</author></property>
<property><replyto>0</replyto></property>
<property><comment>#Reply comment</comment></property>
<property><selectionRightContext></selectionRightContext></property>
<property><state></state></property>
<property><originalSelection></originalSelection></property>
<property><target></target></property>
It does. It contains the number of the comment xobject that it’s a reply to. Just try to write a few comments and look at them in the xobject editor and you’ll see.