I'm trying to get the object of an in-line comment by Talk. but after several tries I still cannot. This only gets me the ID of the comment.
def xhtmlContent = ComponentLocator.getComponent(XhtmlContent)
final List<String> ids = new ArrayList<>();
xhtmlContent.handleMacroDefinitions(page.getBodyAsString(), new DefaultConversionContext(page.toPageContext()), new MacroDefinitionHandler() {
@Override
public void handle(MacroDefinition macroDefinition) {
if ("talk".equals(macroDefinition.getName())) {
ids.add(macroDefinition.getParameters().get("id"));
}
}
}); But I am trying to get the whole object so I can get all the parameters for a report I am making.(Comment Text, Created On, Created By, Status, Color .....)
So I tried other imports such as:
import com.stiltsoft.confluence.talk.manager.TalkManager
and getting the object like this:
def talkManager = ComponentLocator.getComponent(TalkManager)
def talkComment = talkManager.getCommentById(page, "talk-1")
or:
@WithPlugin(com.stiltsoft.confluence.talk.confluence-talk-plugin)
@PluginModule(TalkManager)
using this link:
https://scriptrunner.adaptavist.com/latest/jira/scripting-other-plugins.html
Does anyone know how to do this?