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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.