Dynamic Display of Values in CustomFields

Hi All,

Can we display the values of custom fields dynamically?

The requirement is :

On Clicking a transition, a screen containing a Select List and Mutlicheckbox field should appear where the values of the fields should be loaded dynamically.

Example: The select list should contain all the linked issues from the current issue and on selecting any one of the values from select list, the components in the selected issue should be displayed in the multiple checkbox.

Thanks

Binisha

2 answers

Hi,

This can be achieved by JS and REST.

Make a REST call from JS and update the select list.

Once again on 'onchange' event call REST to bring the components and update the screen using multiple check box.

Hi Nitram,

Thanks for your response. Apart from the options added explicitly to the custom Fields, will it take the other externally configured values?

Do you have any sample code or link to achieve this?

Thanks

Binisha

HI,

Look this code, take it as a example.This is how you need to make a REST call from JS.The below function which takes a argument data is the callback function.

you can get linked issues, components and once you get the response take it and update.

AJS.$("#customfield").change(function() {
jQuery.getJSON(baseurl + '/rest/api/latest/issue/' + issuekey', function(data) {
// callback function , create your logic to handle the get request data
})
})

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

65 views 0 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you