How to develop single/multi user select list?

I want to add a single and multi-user select list using a custom add-on in JIra Cloud, anybody knows how to to do that? Also how to use contextPath() in Jira cloud? How to get the base URL of Jira Cloud?
I am able to do it in Server but not in cloud as I am new in Jira cloud.


In Jira Cloud, you would create a Connect app with the issue field module.

1 Like

Hi @vedant.kulkarni. Could you please clarify what do you mean by “using a custom add-on”? If you’ll provide more structured questions it will be easier to provide valid answers. But let me try anyway.

You can create a custom select single/multiple-choice list based on @atlaskit/select and GET /rest/api/3/groupuserpicker API endpoint. This is one of the ways.

What about other questions, I believe it’ll be easier to read Getting Started Guide to get the base idea of how Jira Cloud addons work.

1 Like

@piskunovigorm It means that using Atlassian connect cloud add-on. Like in the server I have HTML div for a select list and I am fetching user list using server rest API, but I don’t know how to create and add an HTML div element and then fetch user list in a dropdown in the cloud.
Thanks for sharing the packages link, I think that can help me to resolve this, but where should I include a package? in atlassian-connect.json or in HTML file?

@vedant.kulkarni in order to use atlaskit packages, you should have experience in ReactJS development. If not, then you need to get such experience or use AUI library as an alternative way to build your Atlassian interface.

As for the Atlassian Connect application, ways to implement your custom addon depends on the language and framework that you’re using. You can look through the list of frameworks and tools here.

To use framework is the fastest and easiest ways to start building your own Atlassian Cloud addon. So you can start with a framework, its structure, and docs for developers. Also, you can find a way to achieve the same results without pre-configured frameworks, but if so you need to read and understand the requirements from documentation.

I believe we’ll see your first Cloud addon soon. Welcome to the Atlassian Cloud Developers Community. :slight_smile:

1 Like

@piskunovigorm Yes you are correct I need to explore ReactJS and frameworks for Atlassian connect add-ons.

Thank you for the support,

Hey @piskunovigorm, I found this AP.request() method, using which we can fire rest api and get required data. Do you know how to use it for user picker form field? instead of creating user picker field I want to create user picker drop down html element and then show all users there? Is this possible using AP.request() ?

Hi @vedant.kulkarni, unfortunately, if you’re not using React, you need to do the implementation yourself. Otherwise, you can try user picker from atlaskit:

It’s possible to get GET /rest/api/3/groupuserpicker endpoint with AP.reques. For example:

.then(data => alert(data.body))
.catch(e => alert(e.err));

But there is no request to return the user picker form field(if I got right your question).

@piskunovigorm Thanks for the response.
It is better to go with AtlasKit. So I tried to use react code in my jira cloud app but I am getting an error related as Uncaught SyntaxError: Cannot use import statement outside a module.
Any workaround for this?

Also, after creating the hello-world project using the Atlassian Connect framework, how to include react base code and where should I add it? I was trying to add it on js file, from /public/js and then calling in hello-world.hbs the script tag by providing the path of this file. But it is not working at all.