Hi. I have a variable in a Jira Automation Rule that holds the contents of a calculation. I would like to remove the number 1 if it's the very first character in the string. Lets say my variable is "Score". I have been able to get this to work for me:
{{Score.remove("1")}}
I found this example in: https://support.atlassian.com/jira-software-cloud/docs/smart-values-text-fields/
So, for example if "Score" = 108, after the above string removal, it becomes "08" The problem is, if Score=101, I will get a result of 0 since both occurrences of "1" are removed. I only want to remove the first one.
Looking at the String Utils mentioned in the above article, I tried to use this form:
{{Score.Startremove("1")}}
but unfortunately it isn't working and the result is an empty string. I think I need to include another parameter to tell it to just return the source string if the first character is not "1" but I can't figure out how to format that.
Can anyone help?