Hello everybody!
I asked last week the following question in the Atlassian community:
I always link relevant confluence pages to the Jira issues so that I can make my work more traceable. I do that through the Jira ticket as soon as I've created the relevant confluence page.
Is it possible to automatically generate a comment on a Jira issue when a linked confluence page is updated?
I was wondering if that'd be possible through the Jira automation feature or through some other way.
And I got the following response:
At this time, Automation for Jira doesn't support triggers from confluence events, so it is not possible using Automation for Jira alone.
One possibility would be to ask the Script Runner for Confluence community. If you had a script triggered from confluence, you could send a web request to an Automation for Jira 'Incoming Webhook' trigger, which is a trigger for your rules which listens for web requests on a generated url. In the web request payload you send from your Confluence script to this webhook endpoint, if you include the issue ID, you could then extract that ID from the payload and add a comment to the issue in your rule.
So I wanted to ask here as well. Is it possible through the ScriptRunner to have a script where when a confluence page is updated and it is linked to a jira issue, a comment is automatically generated to that Jira issue letting the watchers know that the Confluence page was updated?
I am thankful for any further help. Thank you a lot in advance!
Hey, @Evanthia Charalampidou ! We just published a script to the Adaptavist Library based on this exact use case.
https://library.adaptavist.com/entity/comment-on-jira-issue-for-linked-confluence-pages
The script presumes that you have ScriptRunner for Confluence and ScriptRunner for Jira, though you need only to configure the Event Listener in Confluence. The script is written for Jira 8.x and Confluence 7.1+, but could probably be tweaked for a lower version so long as you have the latest compatible version of ScriptRunner.
Hi @Jonny Carter -- is there a chance there is a similar use case for the Cloud version?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mark Kindy- yup! Take a look at https://docs.adaptavist.com/sr4cc/latest/features/script-listeners . That details how to create a Jira ticket, not a comment, but you should be able to use the REST APIs to create a comment just as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.