Forums

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

How to best populate Jira custom listbox with values from a database

Thomas DeVoe July 5, 2022

I've researched using a Java plugin and using the Rest API as well. There seems to be more articles for Confluence than Jira. Based on my earlier work and reading, Jira and Confluence do not share the same architecture and as a result, do not offer the same development features.

I've found articles about injecting Javascript in Confluence but not for Jira.

I would like to populate a custom field using code. I've already prototyped data access with Scriptrunner but was asked to look into creating a home grown solution using Jira APIs. In Jira, can I use the Rest API to make a call to the database, return the values and populate the field with the values? I would think this is possible using a Java plugin as well but would rather inject Javascript to do the work if possible.

I'm looking for documentation/examples to set this up.

Thanks.

1 answer

0 votes
Thomas DeVoe July 5, 2022

As I dig into this, it seems that a plugin is necessary to deploy Javascript changes, even if the plugin only has Javascript changes. I'm moving forward with this approach to see how far I get. Any tips or comments are welcome.

Thanks.

Florian Bonniec
Community Champion
July 5, 2022

Hi

 

You need an app for that. I would check Elements Connect that allow you to create customfield with value from an api call or a db connexion directly.

 

https://marketplace.atlassian.com/apps/23337/elements-connect-external-data-fields?tab=overview

 

It should work with Scriptrunner as well but less user friendly from my pov

https://scriptrunner.adaptavist.com/latest/jira/script-fields/database-picker.html

 

Like # people like this
Juliette Lallement _Elements Apps_
Atlassian Partner
July 6, 2022

Hi @Thomas DeVoe 

Thanks for the recommandation @Florian Bonniec! I am the Product Manager of Elements Connect.

Elements Connect allows you to configure custom fields that pull data from datasources, REST APIs, among other things.

Here is a useful link that will show you what external datasources are supported: https://doc.elements-apps.com/elements-connect/latest/administration-guide/configuration/datasources-configuration

 

If you need to discuss your use case or need help with your configuration, feel free to get in touch, either through our Support or by booking a slot to my calendar: https://calendly.com/juliette-lallement/30min

 

Best regards

Suggest an answer

Log in or Sign up to answer