We want to create a new project when ever a issue is moved to In progress and we are doing that using automation and rest api and it is working fine. But the problem is we need dynamic ProjectKey everytime we run this rule. For project name and all we are using Smartvalues and it is working fine. What needs to be done for the projectKey?
@Piotr Zadrożny _Eyzee_ Hi, This is my actual ask. Please let me know what needs to be done.
Hi @Samuel Smiles P
Please review the documentation for that REST API function as it describes what is needed for the key attribute: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-post
If instead you are asking how to make the new key unique when you create the project, I recommend developing your own algorithm based on the project name (and perhaps some numbers) and use that consistently for key selection in new projects.
Kind regards,Bill
Hi @Bill Sheboy Thanks for your response.The link which you have sent is for the Projects Type and Project Template but it is not generating a new Project Key. I need project key to be new unique every time this rule runs.
You might look into this API. You can give it an example key (initial letters of your project name) and it will validate if the key is valid or generates a valid random string for the project key that is close to the key you tested. Sadly you cannot just give it a project name.
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-key-and-name-validation/#api-rest-api-3-projectvalidate-validprojectkey-get
Correct, as I was noting this creates the project and the key generation would be independent of that. Please see the other response for generation of a key.
Hi!
You might be able to use some of the string manipulation functions we have to generate a key. e.g.
{{issue.summary.replaceAll("[^a-zA-Z]","").left(5).toUpperCase()}}
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/
Cheers,Brydie
It looks like you're new here. Sign in or register to get started.