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?
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.