Hi, I'm automating bitbucket branch creation on issue creation using "Create branch in Bitbucket" action. In the branch name I wanted to reference the issue key and summary so I used Jira smart values in the branch name field: issue.key-issue.summary.
When testing I get this error:
I think this is because the issue summary contains spaces. This is fixed when creating the branch from the issue directly using the "create branch" button. Jira replaces the spaces in the issue summary with dashes '-'. But in automation this doesn't happen.
So is this a bug or is there a way to do this somehow?
Thanks
I found the solution. To replace the spaces with dashes in the issue summary using Smart Values this did it:
{{issue.summary.replace(" ", "-")}}
Hello @mostafa_gado
Welcome to the Atlassian Community!
I assume you are using Smart Values on the automation. If this is the case, you can use the JSON functions described at https://support.atlassian.com/cloud-automation/docs/jira-smart-values-json-functions/
The function asJsonString should help you resolve it.
Regards,
Eugenio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply. Unfortunately the asJsonString doesn't remove spaces. Only special characters I think as stated in the doc.
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.
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.