Create URL to linked Confluence page in Jira mail

Jan-Peter Rusch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 12, 2018

Hi,

I want generate a mail from Jira when an issue status changes. The mail should contain a URL link to the first linked Confluence page of the issue. This link is always generated, when the issue is created. I can use Automation for Jira or ScriptRunner.

Is there a way to access this issue property from Automation or ScriptRunner?

JP

1 answer

1 accepted

0 votes
Answer accepted
Bastian Stehmann
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 12, 2018

Hi @Jan-Peter Rusch,

 

I think you should be able to do this with ScriptRunner (although I didn't try it).

You can send an email as postfunction or from a custom listener.

And to get that link, you should be able to get the linked pages and then select the right one.

I know this is pretty much theory, but maybe someone else can give you a more detailed example.

Jan-Peter Rusch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 12, 2018

Hi,

it turned out that this was easier than expected. This pageID of the Confluence page was already stored in a custom field.

So I used:

<a href="https://THE_CONFLUENCE_SERVER/confluence/pages/viewpage.action?pageId={{issue.customfield_11601}}">LINKTEXT</a>

in a Automation for Jira action creating a HTML email.

Thanks,

JP

Suggest an answer

Log in or Sign up to answer