Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements


  • Give kudos
  • My kudos


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Scriptrunner email post-function issue URL Edited

tom lister Community Leader Feb 03, 2020


I want to send an email using Scriptrunner Email Post Function. The email needs to contain the URL of the issue.

Is there a built in method to do this?

or do I have to form the link manually with Base URL / project code etc.


1 answer

1 accepted

0 votes
Answer accepted

Hi @tom lister 

Issues don't have an "url" attribute. If you think about it, it would not be a good idea to store that in the db because the baseUrl and the application context could change.

So yeah, making a URL out of the baseURL and issue key is the only way to go as far as I know.

def baseUrl = ComponentAccessor.getApplicationProperties().getString(APKeys.JIRA_BASEURL)
def link = """<a href=
tom lister Community Leader Feb 04, 2020

Hi @Peter-Dave Sheehan 

There are some built in methods for email template e.g. this provides a list of workflow actions in the email.


I was hoping for something similar for other utility functions. Is there a list of available functions.? No sign in the ScriptRunner documentation.

My next issue is how to stop the code snippet showing up in the email from the template as raw text.

And finding the right syntax for displaying the variable value.

I think I can try putting the code into the condition section.



tom lister Community Leader Feb 04, 2020


this embedded syntax works for me


Probably a matter of preference, but I like to keep the template simple and put the more complex stuff in the condition where you get better syntax checking.


2020-02-04 09_33_20-Listeners.png

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

3,957 views 11 5
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you