Hi All,
I have a custom field for the team name. I have set up an automation to clone an issue when this custom value is set. ~I found an article which described how you could use string functions to use part of a custom field to set a smart value. In my case I want to create the issue in the related team's project. I updated the team's values and appended the project ID to the name e.g. Team Name - 10845
When I add the following to smart value, I get the following error:
Hello @Dillon Weyer
I suspect this issue is that you specified fields rather than issue. Try making that change and see if your problem is solved.
Yes, and...to Trudy's suggestion:
If you literally are using "Team Name - 10845" then your substringAfter should account for that leading space character, such as with:
substringAfter("- ")
By the way, for a question like this I'd recommend including images of your complete rule and of the audit log details showing the rule execution. Those may provide more context for the community to help. Thanks!
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.
Thanks so much for the reply @Trudy Claspill and @Bill Sheboy I made the change as per your suggestion, but still getting an error when used as a smart value. For testing, I have included the following insert comment to validate what the value outputs are:
Team Project Code using team name field and using subString: {{issue.customfield_10155.substringAfter("- ")}}
Team name without subString: {{issue.customfield_10155}}
The first one returns the text but no value for the custom field
The second one returns the custom field fine.
I have also included screenshots now as per your suggestion:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
managed to get it to work, needed to add .value i.e
{{issue.customfield_10155.value.substringAfter("- ")}}
once again, thanks for the support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well done, Dillon! Any my error, as I should have asked if you had a single-select or text field; that impacts what is available in the smart values.
When in doubt of the smart values, or when something does not work as expected, this how-to article helps to find the supported smart values for an issue: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.
Register nowOnline 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.