Forums

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

Confiform Radio field to JIRA custom field Error

C
Contributor
May 21, 2019

I have a radio button in a confiform

the field is called AorV

the ID and labels are

1    "A"

2    "V"

I also have a JIRA project with a customfield_12345 - this field is a dropdown field with 3 options - "None", "A" and "V"

When creating a JIRA ticket using my confiform I want the value form the radio button to select the value in the customfield drop down

I am using

"customfield_12345": "[entry.AorV]",

but when I test it I get the following error 

"Error communicating with Jira, {"errorMessages":[],"errors":{"customfield_12345":"Could not find valid 'id' or 'value' in the Parent Option object."}} 

 

1 answer

0 votes
Alex Medved _ConfiForms_
Community Champion
May 23, 2019

Please have a look at this page: https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/

The page explains different formats expected by different field types in Jira. The mapping depends on the field type in Jira, and what you currently have is incorrect.

From a ConfiForms side you can access properties of your fields (also depends on field types in ConfiForms), as well as you have the power of virtual functions to help you with value transformations - this is sometimes necessary to use when preparing the values for multi select fields and other complex types

C
Contributor
May 30, 2019

Hey Alex

 

I am confused by your answer 

In the page of different jira types there is a selectlist option - this says to go with

"customfield_12415": { "value": "red" }

When I try that it works and sets the jira box correctly - red shows in the custom field.

 

However I am trying to get the value from the radio box on the confiform - the options are red and white.

 

From the Accessing field values page is see for Radio Group

myfield

myfield.id

myfield.label

 

So my radio group has two ID's 1 and 2 and two values "red" and "white" - so I am guessing I want to use myfield.label

 

but

 

"customfield_12415" : "[value.myfield.label]"

and

"customfield_12415" : "[entry.myfield.label]",

 

results in this error: {com.atlassian.sal.api.net.ResponseException: Error communicating with Jira, {"errorMessages":[],"errors":{"customfield_12415":"Could not find valid 'id' or 'value' in the Parent Option object."}} 

Alex Medved _ConfiForms_
Community Champion
May 30, 2019

The format is still incorrect... why do you continue to give 

"customfield_12415": "[entry.myfield.label]"

If the format expected by Jira is 

"customfield_12415": { "value": "red" }

!?

It should be: 

"customfield_12415": { "value": "[entry.myfield.label]" }

Suggest an answer

Log in or Sign up to answer