Customfield with external SQL Query


I need to query external SQL server,


select * from XYZ where customfield_10300 = project_id


or better, execute procedure

exec {customfield_10300}

Is it possible?
I have bought plugin below but it doesn't cover my needs.

Power Database Fields PRO


1 answer

0 votes
Alexey Matveev Community Champion Jan 18, 2018


You can do it the Power Database Fields PRO. It is called Dynamic queries. Kindly read here

Yes, but it doesnt work as i want it to...

I can't configure it so it would refresh when opening an issue.

This customfields can only be either as a select list or autocomplete.

Or maybe i'm missing something.

Use case is to have a field that queries database with every issue refresh.

Alexey Matveev Community Champion Jan 22, 2018

It must work like this. What is in your case? When is it refreshed?


As i see it, i can only connect a datasource, and create a customfield which will be filled while creating or editing issue.

Then it works.

My case:

Let's say i have an existing issue with customfield customfield_10300. This is normal number customfield.

And i want to add NEW customfield that will query external SQL and display data basing on existing customfield's 10300 value.

Alexey Matveev Community Champion Jan 22, 2018

Ok, suppose you have a number field with customfield_10300. Then you add a new field which must select data from the database, filtered by the value of the customfield_10300. Then you need to create a new Database Pro Field with a query like this

SELECT id, col2, col3, col4 FROM testTable WHERE id = {customfield_10300}

In this case the values in the new database field will be taken from the database filtered by the value in customfield_10300.


Customfield select is not an issue.

Let me explain again.

I've added a database customfield testdbinfo:

Then, i've added it to the desired screen:

Then, i've checked if it is working... it is.

It shows value  only when I edit and set it manualy.

But, the problem is, that it's not showing on the issue screen by default.

I want to add one field that will automaticly show on all issues.

Alexey Matveev Community Champion Jan 30, 2018

I think I understood your question. You mean that it is not on the view screen unless you chose a value for the field. If so then it is how custom fields behave. They can be seen on the view screen if there is a value. If there is no value, then it will be hidden. That is how Jira works.

So maybe this is a feature for the future, to show external info in the issue view. I think many people would benefit from it.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,859 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot