Hello,
we had an automation rule runnign for the last months. The goal of the rule is to copy the values of the system field Organizations to a custome field "Customer organizations".
We need the Customer organizations field to better structure, filter, search tickets.
Example:
Organization is named "Company123 [Germany]" --> our internal rule to name organizations is always the company name (e.g. Company123) and then space and country in [ ]
The rule copied the values as labels in the field Customer organizations. So the result was:
Label1: Company123
Label2: [Germany]
Since a few days we receive the message:
I believe labels cannot have spaces at all. We store values containing spaces, as values with spaces replaced by dashes. Then when pulling the value, we replace the dashes with spaces.
Add:
{{webResponse.body.idea.categories.name.replace(" ","-")}}
But we have the same issue when there is more than one value, but we're trying to convert an array of values in a webresponse to labels.
Our data comes over as this json
"categories": [
{
"name":"Baseball Game",
"created_at":"2022-12-16T16:13:26.436Z
},
{
"name":"test",
"created_at":"2022-11-02T17:09:27.147Z
}
]
If we have a single value, like "Baseball Game" it will come through as "Baseball-Game"
But with two values, we get the same error, suggesting there is one string being submitted, e.g. 'Baseball-game, test'
Which suggests it's a question of how to iterate correctly using smart values functions, beyond just the .replace(), because after the replace, we'll need to convert to a collection of strings.
So far, the closest I've come is using .asJsonStringArray, as in
{{webResponse.body.idea.categories.name.replace(" ","-").asJsonStringArray}}
Which will generate the array, but also encapsulated as a single string, so we don't have two labels, but one that looks like this:
'["Baseball-Game","test"]'
Ultimately, I decided to break the problem apart to separate Edit Issue calls, wrapped by Advanced Branching, so that we could submit them one a time, still replacing the spaces with dashes.
Hello,
anybody out there, who can help?
I tried to use the split operator, but not working out.
{{debug}}{{issue.Organizations.name.split(" ").first }}
I always get a list and not only the first value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hey Julian,
I've just noticed I have the same problem and I thought maybe it was something I did wrong, but I tested everything and couldn't solve this problem.
I've also created a ticket for Atlassian support, but until they'll reply, If you find any solution for this, please share it. I'll do the same
thanks
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.
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.