Trying to put together a smart value to substring an issue description where I need to dynamically determine the position of the string. Something like the following which does not work.
{{issue.description.substring({{issue.description.lastIndexOf("/")-5}},4)}}
What am I missing here?
Although nested smart values for functions do not work yet, and created variables as function inputs do not work consistently, there may be another approach...
You appear to want some piece of the description, so perhaps using a regular expression with match() to extract text and the parsing further would work.
Would you please describe your Description field contents and the problem you are trying to solve? That may give the community context to offer other ideas. Thanks!
Kind regards,
Bill
Hi @Bill Sheboy I am having the same problem, in my case I am sending emails to JIRA to open an issue and inside description's body I put some variables for example :
[AREA]HR[ENDAREA] -> to show the origin AREA where the issue come from, and in a SmartValue I want to extract with substring "HR" text to put it in a Custom Field in the issue but I get error instead.
This is my Smart Value:
{{issue.description.substring({{issue.description.indexOf("[AREA]")}})}}
(just in case this is an example)
How could I work this in order to fill a custom field of an issue received from email. Thank you in advance.
Regards,
Robert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please take a look at the match() function with a regular expression to pull what you want: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#match--
For example:
{{issue.description.match(".*[AREA](.*)[ENDAREA].*")}}
If this could return multiple results, you will need to parse the result as a list.
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.
Unfortunately, nested smart value functions are not possible at the moment.
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.