Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

How do I deploy a Script Runner groovy script?

I do realize that I can run it in the Script Runner console - and it does work as intended when running it there.

But how do I add it as a post function?

I don't think the documentation I've stumbled across so far covers this very well.

The use-case is:

When a user creates a new story in JIRA, a confluence page with the key + Task number(KEY-10) as a header is created.

How do I add that as a postfunction in the JIRA workflow? If there's a simple step-by-step guide somewhere.

Appreciate the help!



1 answer

1 vote

Edit the workflow, open up the transition you want to add it to, and go to the post-functions tab.

Click "add" to add a new post-function and you'll find a list of installed post-functions.  One of them is "scripted post function", which will take you to a second list of options, most of which are "canned scripts".  In that list there is one entry for "write your own", which will take you to the screen where you can enter the script (or path to a saved file)

Not really sure where to take it from there. I can add a transition but nowhere does it mention I can run the Script Runner code. And the destination etc. isn't really relevant; i simply want to trigger this code whenever a new task is created?

On the new transition, look at the "post functions" tab, and you'll find the option to add

When you go to add a post-function, one of the options on the list is a "scripted post function".  Select that and click next.

Now you get a list of pre-written scripts, but also one that says "write your own".  Select that and click next.

Now you have a screen where you can enter your script.

If you want this on a new issue, then add the post-function to the "create" transition.

Suggest an answer

Log in or Sign up to answer
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

109 views 0 7
Read article

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