How to create custom post function in jira

Hi,

 

I am new jira user, I have a script written in groovy, how can I attached it in jira and use it as a post function.

 

Regards

Salman

2 answers

1 accepted

0 votes
Answer accepted

Hello,

Open your workflow and find the required transition. Then go to the post function tab and push the Add Post Function button. Then choose the Script Post-Function [ScriptRunner] post function. Then choose the Custom script post-function option and add your script.

Post_function.pngThanks, but I am unable to find the Script Post-Function  option, do I need to install application [ScriptRunner] ?

Yes, you need to install the ScriptRunner plugin first

HI @Syed Salman

Actually, you have not yet mentioned which JIra (Server/cloud) are you using, For this first, you need to Edit the workflow on which you want to apply this Post Function.

For JIra server:

1. Admin --> Issues --> Workflow --> select the workflow and edit in diagram mode 

2. select and click on transition on which you want to apply the post function ..select post function, click on Add Post Function --> script post function --> custom script and then add the script and then publish your workflow.

https://confluence.atlassian.com/adminjiraserver/advanced-workflow-configuration-938847443.html#Advancedworkflowconfiguration-essentialpostfunctionsEssentialpostfunctions

For JIra Cloud:

  1. Select the Jira icon Jira settings > Issues.
  2. Click Workflows and then Edit for the relevant workflow.
  3. In diagram mode, click Post Function.

When you click Add Post Function, you can choose from the available script post function and add the script.

https://confluence.atlassian.com/adminjiracloud/advanced-workflow-configuration-776636620.html

Thanks for the detail reply, I am using jira server 7.9, I am unable to find the Script Post-Function  option, do I need to install application [ScriptRunner] ?

Yes, as @Alexey Matveev [cPrime] mentioned you need to install Script Runner first then only the script post function option would be available and you can use it.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Thursday in Jira

Updates to jira.atlassian.com give you visibility into what's coming in Jira Server and Data Center

Hello, Community! My name is Gosia and I'm a Product Manager on Jira Server and Data Center here at Atlassian. Since 2002 when we launched our public issue tracker, jira.atlass...

478 views 1 14
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you