You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
I need to save the Project Key in a variable when I create an Issue.
I've tried issue.project.key and also issue.projectKey but doesen't work
how to do it?
Thanks
Welcome to the community!
If I have understood your requirement correctly. You can use the Create issue post function and the substitution variable %original_project% while setting the custom field. Let me know if you have any questions.
Disclosure: I am the product manager for Create on Transition for Jira Cloud.
Thanks,
Nishanth T
Hi Nishanth,
I'm doing a scriptrunner post function and I need to use the JQL Search API to find some issue, for this reason I need to create a Variable and use that in the JQL expression like: "Project = ${variable}"
I need to get the Project Key from the Issue I have created, because the post function start after the creation of that issue. I can get the issue key doing issue.key, there is a similar way to get che project key?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Erika,
I can confirm that this is not possible t create a variable that can be used in a JQL search as Atlassian does not support variables being passed into a JQL query.
I can confirm that when you create an issue you can reference the issue object which comes in the binding of your script and below this you will be able to get the issue key and you can then write some logic to strip away all characters after the - character as this will give your project Key as Atlassian do not store the project key below an issue so this is the only way to get it with ScriptRunner for Jira Cloud.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.