Forums

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

What is the ConfiForms JSON code to create a Task with a Component from different dropdowns?

Omar Contreras June 2, 2020

My JSON is working fine when it is refering to a single list of categories, such as:

"components": [{"name": "[entry.CategoryListOne.escapeJSON]"}],

I have four additional lists of categories to choose from and add the corresponding Component. What would be the proper structure? 

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
June 3, 2020

You nee d to create a structure from a multi-value holding field using, for example asArrayOfKVPairs(key) function https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions

Something like

"components": [[entry.CategoryList.asArrayOfKVPairs(name)]],

or

"components": [[entry.CategoryList.transform(label).asArrayOfKVPairs(name)]], 

depends on what you want to send over to Jira - IDs or LABELs from your "CategoryList" field

Omar Contreras June 5, 2020

Thanks Alex, 

yes this works, and also listing the Components one by one as shown below:

"components": [{"name": "[entry.Component1.escapeJSON][entry.Component2.escapeJSON][entry.Component3.escapeJSON]"}],

Suggest an answer

Log in or Sign up to answer