Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Dynamically populate options in customfield type plugin (velocity template) on click of a button

Kapil Bolli
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 28, 2016

Hi All,

I have a text field - user id  and i have created custom field type field plugin(Generic CF Type) - User Name

fetchUserNames.png


My requirement is to dynamically populate the options of a custom field User Name based on the value of a custom field User Id on click of a button Search available in the edit  velocity template of User Name field.

The custom field type plugin module populates the values on time of load of the screen,but not at run time when the user id is changed and search button is clicked. The search button should call a method in Java class which returns list of String objects.

 

I have read the following post -https://answers.atlassian.com/questions/153603 but could not find the solution.

Thanks 

Kapil

1 answer

1 accepted

0 votes
Answer accepted
Kapil Bolli
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.
July 12, 2016

I have achieved this exposing REST service in the plugin and do an ajax call of the REST service in velocity file of that customfield

Suggest an answer

Log in or Sign up to answer