Double Quotes Not Escaped Creating Jira Issue with Confiform

Stuart Wosika
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2024

Hi guys,

 

I have an IFTTT macro to "Create Jira Issue" and the JSON is wrapped in a NOFORMAT macro.  I have custom Jira fields of type "Text Field (multi-line)".  In my form, when a user submits an entry using double quotes " then the form throws an error.  Problem is that I cannot seem to be able to escape this character.  I have tried the following:

 

[entry.IHRisk1.escapeJSON]

 

IHRisk1 is a field of type "TextArea" in Confiform.

 

If I pass double quotes into the system field summary or description, I have no issues, but that is not what I want in terms of behaviour of the form.

 

Surely Confiform should be able to escape characters sent to custom fields in Jira.

 

Regards.

 

Stuart.

 

p.s. I did look at the following link from Alex but this did not work 

https://community.atlassian.com/t5/Confluence-questions/IFTTT-issue-with-quotes-in-text-field-and-calling-JIRA-Key-quot/qaq-p/1790752

2 answers

1 accepted

1 vote
Answer accepted
Stuart Wosika
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2024

Hi guys I have solved this, not sure why I did not think of this before !!!!! Solved using virtual function replaceWith.  So:

 

[entry.IHRisk1.replaceWith(",').escapeJSON]

 

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 11, 2024

Why this is necessary? Could you share WHERE the quotes are not properly scaped with this "escapeJSON" function?

Are you talking about Velocity templating and setting the local field from a ConfiForms field?

0 votes
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2024

Hi

Where does NOT ConfiForms escape the double quotes for you correctly?

Using the following construction does not work for you?

[entry.IHRisk1.escapeJSON]

May I see a complete configuration for the JSON mapping that does not work for you?

Alex

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events