The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

ChristopherChilds
Contributor
March 4, 2024

Hello,

 

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')

    setPriority('Minor')

    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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Stefan Salzl
Community Champion
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?

Best
Stefan