Populate JIRA issues Keys in a Confiform dropdown

abidaliahmed April 13, 2021

Hii,

I would like to get all the issues from jira and show the keys in a dropdown in a confiform.

I wrote the jql and it works fine 

My confluence is already integrated with my JIRA server 

and I create a webservice in ConfiForms app configuration

but when I tried to use it in webservice dropdown field I got null json 

Any idea ?? do I need to enable some configuration ??   

1 answer

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.
April 13, 2021

Hi

How is your field (webservice dropdown) is configured?

Do you have something like this

Screenshot 2021-04-13 at 16.33.11.png

Screenshot 2021-04-13 at 16.33.18.png

Assuming your connection is pointed at Jira server (root)

Alex

abidaliahmed April 13, 2021

Hi Alex

I set up as the images 

issues and key

 

 

regards,

Abid

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.
April 13, 2021

How about the JQL you use? Is it properly URL encoded?

If you put the same URL into the browser url - do you see the results?

abidaliahmed April 13, 2021

MyJIRAServer/rest/api/2/search?jql=status%20in%20(open)&fields=key

 

exactly .. I got json result but it doesn't work within the field configuration 

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.
April 13, 2021

But you have specified limit fields via

&fields=key

Of course it doe snot load fields!

As you ask it not to load anything but the "key"...

Alex

abidaliahmed April 13, 2021

yes that's right, I only need a key to show it on the dropdown 

no need for the other fields 

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.
April 13, 2021

And what is the mapping for "label" in your web service dropdown field?

abidaliahmed April 13, 2021

I left it empty

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.
April 13, 2021

Well, should not you put key there to show the key?

I understand that you dont want an empty label... 

abidaliahmed April 13, 2021

I think the problem in the connection to jira server 

because when "See the service mapping" in the dropdown configuration I got [] 

an empty json ,so no data is loaded here.

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.
April 13, 2021

Cannot tell about the connection itself... you need to check that yourself

And you need to put a mapping for "label" parameter as key

abidaliahmed April 13, 2021

I did that but I got nothing.

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.
April 13, 2021

Empty results (json array) means you have no results returned

So it is either the Jira permissions thing or incorrect (web service) connection

How is this configured? You can open support ticket directly with us  - so it will be more safe to share the config details

 

Alex

abidaliahmed April 14, 2021

Hi Alex

As I said it was a connection error confluence server couldn't see JIRA server.

Now it's working fine.

 

 

Many Thanks,

Abid 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events