Hi there,
I'm struggling converting an object type custom field into another instance of the same field type.
Let me show the problem with a basic example (the real thing is a bit more complicated).
I have Forge custom field type structured like this
{"keys": ["FOO-1","BAR-17"]}
Now I am trying to copy the value from "field1" to "field2", but instead of the structure shown above, I am getting this storage format
{keys=[FOO-1,BAR-17]}
This is apparently no valid JSON and throws an error when copying the value to "field2"
This is my Example Automation rule
Any chance to convert this value to a valid JSON format?
Hi @Bill Sheboy ,
thanks for the hint, but unfortunately that doesn't work.
I don't get the right output format with the provided smart value functions (I also tried asJsonObject)
Cheers,
paul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What did you observe happening: an error or the update did not happen as expected?
Please show an image of how you tried to use that function.
From what you have shown, I would expect the syntax to be this substituting in your original field name and not the created variable:
{
"fields" : {
"keys" : {{issue.yourFieldName.asJsonStringArray}}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy ,
it seems I wasn't smart enough :P
It's working now as you suggested
I used it this way:
"keys" : {{issue.field1.keys.asJsonStringArray}}
Thanks for your solution!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; I am glad to learn that helped!
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.