Hi all,
I've encountered a problem that I can work around but it's a pretty ugly hack, I'm wondering if there's a better way to do this. I need to use string.replace() to, within a long block of text, swap all occurrences of the value of one field to the value of another field. (I do this dynamically instead of flat substitution because it's a generalized rule that will fire for multiple use cases.) For example, start with :
The rule:
I don't actually get any errors, it says it ran successfully, but trying to index "issue.fruit placeholder" from WITHIN a smart variable's function does not work the way it does if I just index {{issue.fruit placeholder}} directly. The weird part is that it seems to be because the name of the variable has a space in it. If instead, I make a fields called "cache1" and "cache2" and do this, it works:
That works fine. So, it definitely seems to be the spaces. Is there any way to index variables with spaces in the names other than writing out the spaces, so that they are able to be indexed from within functions? Or am I missing some weird detail here?
Hi Brandon,
Instead of using the field name, can you please try use the custom field id instead. E.g {{issue.customfield_1234}}
Let me know if that works for you.
Cheers,
Scott.
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.