Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

ConfiForms Jira API Calls (Cloud) receiving error 'You need to post a valid JSON to the service.'

GAVIN Benn
Contributor
February 8, 2025

Hi all,  I'm having issues with creating what I'd call a complex ConfiForm and pushing the data ingo a Jira Create Issue via API.

Please have a look at my Code Block, Error being received and screenshot of fields.

 


Code Block:

 

 

 


Error:

You need to


Fields being used:

 

1 answer

0 votes
Alex Medved _ConfiForms_
Community Champion
February 8, 2025

Hi @GAVIN Benn 

There is nothing more to say than ConfiForms does - the JSON you are constructing is not valid and will not be accepted by Jira

ConfiForms Jira helper shows you what structure the field accepts and ConfiForms offers lots of functions to transform the value https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions

So instead of something like

"customfield_15235": [{"id": "RSP Impact [entry.rspimpact.asArrayMultiSelect]"}]

You need the field to produce the value as array of objects that have an id property

"customfield_15235": [[entry.rspimpact.asArrayOfKVPairs(id)]],

And so on...

Alex

GAVIN Benn
Contributor
February 10, 2025

Thanks Alex, any additional tips for troubleshooting the JSON  I have?

Alex Medved _ConfiForms_
Community Champion
February 11, 2025

Have you fixed those fields that I have mentioned? What JSON mapping do you have now?

GAVIN Benn
Contributor
February 11, 2025

Thanks Alex, I'm looking to try and add this into my form today.  Haven't been able to get back to this build until today.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events