Forums

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

Using ConfiForms to set value in a custom Jira field

Ron M June 29, 2023

Hello, trying to use ConfiForms to create a form for submitting an issue to a project, but am getting stuck on a custom field. ID for the custom field is 11614 and this is what I'm using to set the value according to which one the user chooses:

"customfield_11614": "[entry.requesttype.label]

 I receive the following error when attempting to submit the form:

  • Could not prepare JSON: '{ "fields": { "project": { "key": "RISK" }, "summary": "Testing Form", "description": "Testing of new ConfiForm page. ", "customfield_11614": "Fraud "issuetype": { "name": "Task" } } }' Used JSON: '{ "fields": { "project": { "key": "RISK" }, "summary": "Testing Form", "description": "Testing of new ConfiForm page. ", "customfield_11614": "Fraud "issuetype": { "name": "Task" } } }

Tried several different combinations with no luck. Any suggestions?

2 answers

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
June 29, 2023

Hi @Ron M 

You seems to be missing the closing quote

"customfield_11614": "[entry.requesttype.label]",

Alex

Ron M June 29, 2023

Hi Alex,

My mistake, ended my copy and paste a few characters early. I have it entered as shown in your example.

Alex Medved _ConfiForms_
Community Champion
June 29, 2023

And what error message do you get?

Ron M June 29, 2023

Here's the error:

  • com.atlassian.sal.api.net.ResponseException: Error communicating with JIRA, {"errorMessages":[],"errors":{"customfield_11614":"Could not find valid 'id' or 'value' in the Parent Option object."}} Used JSON: '{ "fields": { "project": { "key": "RISK" }, "summary": "Testing Form", "description": "Testing of new Confluence page. ", "customfield_11614": "Fraud", "issuetype": { "name": "Task" } } }' Request to url = https://jira.qualstarcu.com:8441/rest/api/latest/issue/
Alex Medved _ConfiForms_
Community Champion
June 30, 2023

This just tells you that the mapping for the "customfield_11614" field is not correct and it expects an id or a value that Jira understands

What field type in Jira does the "customfield_11614" has?

https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/

Alex

Ron M June 30, 2023

Thank you for helping me out on this one Alex. Field type is select list (single choice).

Alex Medved _ConfiForms_
Community Champion
June 30, 2023

Have a look at the link I have shared in my previous comment

The mapping needs to be something like

"customfield_11614": { "value": "[entry.requesttype.label]" },

Alex

Ron M June 30, 2023

Thank you, Alex. Your last example resolved this for me. I'd tried something similar, but was slightly off. Thanks again.

0 votes
varatha December 19, 2024

Hi Alex,

 

I have setup "Epic Link" field with "jira issue" field type in confiform but epic link value not captured in created jira.

 

Kindly help. I tried below help it does not work. Iam using confluence data center

 

"customfield_11614": { "value": "[entry.requesttype.label]" },
Alex Medved _ConfiForms_
Community Champion
December 19, 2024

Does not the epic link expect an issue key as an input?

Something like a

"customfield_11614": "ISSUEKEY-123",

 

varatha December 19, 2024

 

Hi Alex,

 

Thanks for reply,

Need to get Epic link from Confiform Field - Epic Link. Kindly help

 

Alex Medved _ConfiForms_
Community Champion
December 19, 2024

What’s the field name in ConfiForms for this field and what type it has in ConfiForms?

varatha December 19, 2024

confiform.png

Please let me know API code for update epic link in jira

varatha December 19, 2024

Field Type is "jira issue"

Alex Medved _ConfiForms_
Community Champion
December 19, 2024

What is the field name?

varatha December 19, 2024

DO we need edit permission of jira project? I do not have edit permission may be the issue?

varatha December 19, 2024

Field Name is "Epic Link"

Alex Medved _ConfiForms_
Community Champion
December 19, 2024

It is a filed label, I am asking about the filed name you have for this field in ConfiForms Field Definition

varatha December 19, 2024

epiclink.png

Alex Medved _ConfiForms_
Community Champion
December 19, 2024
"customfield_11614": "[entry.EpicLink]",
varatha January 15, 2025

Hi Alex,

Still iam not getting epic link value update in jira ticket, Kindly help

EpicLink id: - 10012

{
    "fields": {
       "project":
       { 
          "key": "CITE"
       },
       "summary": "[entry.ProjectTitle]",
       "description": "\n\n- Demand Id: CITE-[entry.UniqueID]\n- Project Title: [entry.ProjectTitle]\n- Business Contact: [entry.BusinessContact]\n- System Interface Contact: [entry.SystemInterfaceContact]\n- Description: [entry.Description]\n\n Testing Timelines or Sprints: \n\n- Phase: [entry.Phase]\n- StartDate: [entry.StartDate]\n- EndDate: [entry.EndDate]\n- No. of Weeks: [entry.Numberofweeks]\n- UserRequirement: [entry.UserRequirement]\n- Comments: [entry.Comments]\n\n",
       "issuetype": {
          "name": "User Story"
           },
   },
     "customfield_10012":"[entry.EpicLink]",
   
  }

 tried this as well -> 

"customfield_10012":"Epic Link [entry.EpicLink.label]",
Alex Medved _ConfiForms_
Community Champion
January 15, 2025

Do you have a field in ConfiForms with a name EpicLink and is it of type Jira issue?

varatha January 15, 2025

Yes we have it.epiclinkww.png

Alex Medved _ConfiForms_
Community Champion
January 15, 2025

So, what happens when you set it's value and submit the form and have this mapping added to the JSON mapping?

"customfield_10012":"[entry.EpicLink]"

(note that you have an extra , .. it is breaking the JSON object, as it is the last property you add) 

varatha January 16, 2025

Hi Alex,

Still Epic link Value not reflect in jira issue. Kindly help.  This is the system field in jira do we need to get any edit permission from adminEpicvalue.png

Alex Medved _ConfiForms_
Community Champion
January 16, 2025

Where did you find that the field 

customfield_10012

is an epic link field name?

varatha January 16, 2025

From jira admin and as well as from jason template from create issue in confiform

varatha January 16, 2025

Yes epic link field name id get it from admin

Suggest an answer

Log in or Sign up to answer