Within a automation I am doing an Advanced compare condition that is:
{{fieldChange.toString.left(fieldChange.fromString.indexOf(":"))}}
This gets me the start of the string up to the character before the ":". However, I want to include ":", so have tried is:
{{fieldChange.toString.left(fieldChange.fromString.indexOf(":")+1)}}
But this gives and error. How do I add 1 to the indexOf?
You cannot add numbers like that in a smart value expression without using the mathematical expression syntax: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
Instead, please try using the plus() function, such as:
{{fieldChange.toString.left(fieldChange.fromString.indexOf(":").plus(1))}}
Kind regards,
Bill
Not sure but you can maybe try the following, it seems more logical to me (not sure it will work and not even sure it's possible).
{{fieldChange.toString.left(fieldChange.fromString.indexOf(":"+1))}}
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.