You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi,
I have created a ConfiForm that on user submissions creates a Task in Jira. I have a couple of WYSIWYG fields however these are causing me some problems. If a user types just one line the form works, but if they press ‘enter’ on the keyboard and create a new line in this field, Confluence shows the below error when they try to submit.
“invalid format. Unterminated string at 1225 [character 0 line 40]”
I have looked at line 40 in my JSON code but I can't seem to identify any issues and it will only throw the error if the ‘enter’ key is used when typing in this field. This happens to any WYSIWYG field I have in the form. Any idea why this is happening and is there a way to fix it?
Any help is greatly appreciated!
Cheers,
Chloe
Hi @Chloe P
In your mapping for this field in ConfiForms IFTTT macro add a escapeJSON function to ensure the value is safe for JSON field's value you are getting
Assuming your field name is yourWYSIWYfield then that would be something like below
[entry.yourWYSIWYfield.escapeJSON]
Alex
Thank you! This has fixed that error.
I also ended up using 'extractText' as I was hitting issues with the HTML so it now looks like the below:
[entry.yourWYSIWYGfield.extractText.escapeJSON]
This removes all the line breaks and dot points the user has input when it creates the Jira issue though. Is there any way to keep it in the WYSIWYG format?
Thanks for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that "extractText" might also be necessary, as Jira does not accept ALL the HTML that the WYSIWYG field could handle
Alex
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.