Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×I'm very new to Json. I'm creating an automation and would like it to copy data from fields in one project to different fields in a different project. My automation works fine, except I'm getting a syntax error on my JSON.
{
"fields": {
"Description": "{{triggerIssue.data load description }}"}},
"Original description[Paragraph]": "{{triggerIssue.description }}"
}
}
I need the field "data load description" (custom field) to be updated with what is in the field "description" (standard description field) and then ALSO update the field "Original description" (custom field) with what is in "description" (standard description field)
One source suggested using the custom field ID. When I look that up for my field "Original description" it shows what I have above, "Original description[Paragraph]", and not a number like I have seen in other places. But ""Original description" also doesn't work.
Thanks in advance for any help!
For a question like this, context is important for the community to help. Please post the following:
Until we see those...
For the expression you show, there are extra spaces after the field names and before the double-curly brackets which may be causing errors.
And...smart values are name, spacing and case-sensitive. Have you confirmed you have the correct smart values (or custom field IDs) for the fields? This how-to article helps to confirm the correct ones:
https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Kind regards,
Bill
The project type is company managed.
Automation overall screenshot:
Details of Create new work step:
Audit Log:
If I take out the Json part in the additional fields, the automation works fine. That's why I think it's something with that particular part (in addition to the audit log telling me that it's not valid JSON.
If I try to create a filter with the custom fields I made, here's what shows there for the smart values.
I've tried this with and without the [paragraph] part. And I copied / pasted this directly into JSON and it still didn't work. The rest api link didn't work for me today, but I can work with that more tomorrow to double check the the smart value / custom id of the custom fields.
Thanks for asking for additional context... Let me know if there are other things I can add the would help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information, @Amy Schindel
In both your original and the JSON shown in the rule images, there are typos / stray curly brackets. And, please note smart values are name, spacing, and case-sensitive. This is why I suggested using that how-to documentation confirm them.
Here is a cleaned up version that may work if the the smart values are correct:
{
"fields": {
"description": "{{triggerIssue.data load description}}",
"Original description[Paragraph]": "{{triggerIssue.description}}"
}
}
I suspect that "data load description" is not the correct smart value for the field. Perhaps try using the custom field ID instead, which can also be found with that how-to.
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.