Forums

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

How to use user select field in my forms?

Yanduganov Andrey
Contributor
August 10, 2017

Hi!

I need to select users and groups in form in my plugin. I can use user picker and get username from it (or groupname for group) but how to use autocomplete? I have tried some ways but nothing works.

I need help.

Thanks.

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
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.
August 10, 2017

How are you drawing the fields into your add-on, and what type of add-on is it?

Yanduganov Andrey
Contributor
August 10, 2017 edited

I'm not drawing fields. I just added input into velocity template. Then I added link like this:

"<jira>/plugins/secure/popups/UserPickerBrowser.jspa"

what type of add-on is it?

What do you mean?

Nic Brough -Adaptavist-
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.
August 11, 2017

The type of plugin was to ask whether it's a Server or Connect add-on, as they're structured very differently.

As you're working with velocity, that strongly suggests it's an add-on for Server.

Your attempt to include the field like that is simply not going to work.  A jspa page is a generated page that is built on-the-fly within a specific context.  You are demanding a rendering of it with no context sit, so there's no way it's going to work.

Your vm needs to implement the code in the field in context in order to do this.

Yanduganov Andrey
Contributor
August 13, 2017

So, there is only one solution: to inmlement my own autocomplete? And is it really there is no way to use built-in custom field?

Nic Brough -Adaptavist-
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.
August 14, 2017

I suspect you might be able to parse the .vm file for the User Picker as it's built into JIRA, but you'll have to do it with the right context set, providing all the variables it needs in it.

Might be easier to use it as a base for your own coding.

Yanduganov Andrey
Contributor
August 14, 2017

Thank you. However it is not solution that I wanted...

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events