ConfiForm -Component/s error

Prabhu Prabhakar June 8, 2021

Hi All,

I'm new to ConfiForms.

I created a ConfiForms Form were the results are to be used to create a Jira issue using the IFTTT integration rules.

I'm getting error on System field "Component/s" and its a required field in that particular project.

Could someone help me how to describe JSON for that particular field?

image.png

image.png

3 answers

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
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 8, 2021

Field names are case sensitive!

Components != components

You are also missing a comma after the "TestComponent1"}], <----- comma is missing

Prabhu Prabhakar June 8, 2021

@Alex Medved _ConfiForms_  Thanks!

 

I edited the comma and adjusted the Components,

Still I'm getting the same error.

Could you please help me to resolve it?

Alex Medved _ConfiForms_
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 8, 2021

You could not be getting the same error if you have changed the name and fixed the JSON mapping.

 

Also, please check if you actually can set the components on Jira issue when you create the issue in Jira via UI (of type "Task" in INF project)

Do you see "components" field there (in JIra Create Issue form)?

Prabhu Prabhakar June 9, 2021

image.png

Yes I can see,

Please check the screen shot and components is system field with multi selected option and it's a required field for the "Task" issue type to the particular project.

Alex Medved _ConfiForms_
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 9, 2021

How does the complete (jira issue JSON) mapping looks like?

Like Zuber Khan likes this
Prabhu Prabhakar June 9, 2021

Sorry!! I didn't get you.

Alex Medved _ConfiForms_
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 9, 2021

On Confluence/ConfiForms side you have a JSON mapping (in IFTTT macro body)

how does it look like now?

Prabhu Prabhakar June 9, 2021

image.png

Alex Medved _ConfiForms_
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 9, 2021

Sorry, but I was asking about the macro body, no macro properties...

Something what you have on your initial screenshot, but current

Alex

Prabhu Prabhakar June 9, 2021

Currently I'm trying with different JSON syntex, 
But I didn't  get the result, not sure how to set.image.png

Alex Medved _ConfiForms_
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 9, 2021

But setting components in Jira is done differently!

You should really consult the documentation for Jira API - there is nothing to do with ConfiForms here... 

"components" : [{"name" : "Network [entry.tname]"}]

 (and you had it almost right initially, but then moved to something else - really dont understand why)

Also, in your mapping you have a },} in the end.. WHY do you have a ","? Jira expects a valid JSON to be posted

Alex

Prabhu Prabhakar June 9, 2021

Now I'm getting this error,

Thanks,

Prabakaran

image.png

Alex Medved _ConfiForms_
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 9, 2021

OK, and what do you ask?

I believe the error message is self explaining - you dont have a component by name "Network" registered... and therefore it is not valid as an input

Prabhu Prabhakar June 16, 2021

Hi @Alex Medved _ConfiForms_ 

If I use this "components": [{"name":"Applications"}], It's working with out error and Jira ticket is getting created with the component as "Applications" only, but I should allow the users to select their choice. 

How I can get those options?

Could you please help me with the code?

Alex Medved _ConfiForms_
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 16, 2021
Prabhu Prabhakar June 25, 2021

@Alex Medved _ConfiForms_ 

Thanks! , Now it's working as per my requirements, 

I've another field to set.

Priority System field, I'd like to have the sysntex to set this field in ConfiForm.

Could you please help me?

Thanks

Alex Medved _ConfiForms_
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 25, 2021

Simple search over the community reveals good answers to this question.. For example this one https://community.atlassian.com/t5/Jira-questions/Can-t-set-priority-when-creating-an-issue-REST-API/qaq-p/1190923 

 

Alex

k M October 3, 2022

@Prabhu Prabhakar ,What was done finally to fix this component/s issue to call from jira as I am also facing the same issue while trying to call jira from confiforms.

 

Can you please share the working code here so I also implement the same.

0 votes
k M October 3, 2022

@Prabhu Prabhakar , What was done to fix this component/s from jira to confiforms ,Can you please share the working code here as I am also facing the same issue while trying to call confiforms from Jira..I need user to select the application name from confiforms and the same to be populated as a jira ticket..

0 votes
Danyal Iqbal
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 8, 2021

Bad practice but if you still want to do it the documentation is your freind.

https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#editing-an-issue-examples

Setting the components field

Request

Copycurl \ -D- \ -u charlie:charlie \ -X PUT \ --data {see below} \ -H "Content-Type: application/json" \ http://localhost:8080/rest/api/2/issue/QA-31

This is an example input data:

Copy{ "update" : { "components" : [{"set" : [{"name" : "Engine"}, {"name" : "Trans/A"}]}] } }

Suggest an answer

Log in or Sign up to answer