Customfield with external SQL Query

Hi,

I need to query external SQL server,

 

select * from XYZ where customfield_10300 = project_id

 

or better, execute procedure

exec give.me.data {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

Hello,

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

https://confluence.cprime.io/pages/viewpage.action?pageId=6556967

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.

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

Alexey,

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.

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.

Alex,

Customfield select is not an issue.


Let me explain again.

I've added a database customfield testdbinfo:

https://ibb.co/dkUQuR


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

 https://ibb.co/j1Gig6

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

 https://ibb.co/cdNdER

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.

https://ibb.co/jF93g6

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 Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,790 views 18 22
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