I am trying to write a very simple automation to parse the description field from a story that contains the text 1:2:3:4 and use the Log action to output its empty status, size, and each list item. What I am seeing is that when I run it, I can output the string in the description, it tells me the smart value is not empty and I can't output the first list item from the split command when I try {{row.get(0)}}. Any idea what I am missing? Every example that I have tried has the same result.
Thanks!!!!
Created variables are always text type. And when you split() the Description field, the result is the rows variable gets this:
When you later want to return to a list, the split() command is needed again. For example, to get the size:
{{rows.split(", ").size}}
Tip: The implicit join() is undocumented type conversion behavior, and so I recommend explicitly adding a join() with your desired delimiter to always know what is in there.
Kind regards,
Bill
Thank you for the quick response. Very much appreciated. That being the case, then how do you reference a row in a advanced branch then? Assuming the smart value for the branch is still {{issue.description.split(":")}}?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that is one way to do it:
And inside the branch, reference the item as {{varItem}}
Please note well: this assumes there is at least a non-empty Description field with a colon ":" delimiter and no newlines in the field.
The solution is to always test to confirm the behavior matches what you plan.
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.