How to get the prject Key in scriptrunner with Jira Automatuion.

ChristopherChilds March 4, 2024



I am creating a global Jira Automation rule in script runner. Let say I want to, among other things create an issue for each project using a schedule trigger..

projectKey = ruleContext.renderSmartValues('{{project.key}}')

Issues.create(projectKey , 'Bug') {

    setSummary('My Issue Summary')


    setDescription('Some description')


this works but...

But because I want this to be an agnostic rule, I want to write a single script and share it with many projects. I do not seem to be able to get the project key when it is run.  Any Ideas?



1 answer

0 votes
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 4, 2024

Hi @ChristopherChilds 

Could you describe the rquirement behind that? What exactly are you trying to achieve? which problem should be adressed with this solution?

As you mentioned your script works what part is missing? Furthermore as you want to have it executed scheduled: why not choosing scriptrunner alone? Why would you put it into another technology if you have scriptrunner already?


Suggest an answer

Log in or Sign up to answer