It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Custom Field not displayed when using Database Custom Field plugin

Carsten Hilber May 27, 2013

I have configured a custom field with the Keppler Database Custom Field plugin. I wanted to try with a simple select so I tried to configure a query which si statically giving back the number 3.

I turned on Debug and I can see the output like this:

2013-05-28 15:53:05,367 http-bio-8080-exec-37 DEBUG cahi 953x2048x4 1gpefkd 192.168.42.82 /secure/EditAction!default.jspa [databasecf.querydb.impl.QueryDatabaseImpl] Results for executing SQL query >>
select effort from psa_time_entry where task = '1819640'<< are >>[{EFFORT=3.0}]<<

As column I declared effort of course. My database user is read only and I just want to show the field as a text. I wouldn't care if it is shown in a combo though.

The issue is that the field is not shown at all. When I use the where is my field option it tells me that the field has no value and therefore it is not displayed.

Any ideas?

Carsten

4 answers

1 accepted

0 votes
Answer accepted
Alexandru Iacob May 27, 2013

You can achieve what you are looking for by using the SIL Script Custom Field from our KCF plugin (Kepler Custom Fields - https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.keplercf) and the sql routine, which is documented here:

http://confluence.kepler-rominfo.com/display/SIL/sql

Documentation for the SIL script custom field usage is here:

http://confluence.kepler-rominfo.com/display/KCF/SIL+Script+Custom+Field

Basically, you should add a SIL script CF with the following script configured:

return sql("your JNDI datasource", "select effort from psa_time_entry where task = '1819640'");

The field will show you the desired value from database on view issue.

Make sure also that you choose the appropriate searcher for your field. In this case I suppose an Exact Number Searcher would be appropriate. For more details on SIL Script CF check the documentation link pointed above.

Hope this helps.

Carsten Hilber May 27, 2013

Great, thx!

0 votes
Alexandru Iacob May 27, 2013

Hi Carsten,

What databasecf and jira version are you using and on what browser?

Are there any other messages in the log that might give a clue of what is causing the problem?

Do you experience this problem on all screens?

You could try performing a reindex and also cleaning the cache of your browser.

Is the field missing also from the list of custom fields shown when clicking on Configure Fields in the edit issue screen?

Regards,

Alex

0 votes
Carsten Hilber May 27, 2013

Hi Alex,

First of all thanks for your quick answer.

I am using JIRA 5.2.4 and databasecf 2.1.12.

In the logfile are only some debug statements, nothing which would point that something would be wrong. And now that you mentioned it, the field is shown on the edit issue dialog, funny... In the Configure Fields option the field is also visible. So it is only not shown when I view the issue.

I am using Firefox, just to look if the problem occurs in different browsers I tried IE8 with the same result. I just reindexed and cleared the cache with no effect.

any ideas?

Thanks

Carsten

Alexandru Iacob May 27, 2013

What configuration do you have for the dbcf field? You should choose type select list and uncheck "Add None option". However, you still need to enter on edit issue and save the value on issue, otherwise it won't be shown on the view issue screen, as it has no value.

0 votes
Carsten Hilber May 27, 2013

Ok, seems as if i had a different understanding of showing the value. You are right, when I edit the value and save it, then it is displayed correctly. But this value is changing in the database and I cannot always edit the issue to view the correct value...

Is there any solution for just displaying values from databases which are corresponding to the issue in JIRA but will never actively set through the issue? JIRA is not notified when the values are changed in the database :-(

regards Carsten

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Marketplace Apps & Integrations

scaling agile at the enterprise level with Valiantys

Hey there Community! My name is Vannya Vallejo, the Channel Communication Specialist at Atlassian and I want to help Atlassian users like you learn about our Solution Partners and how they can help ...

436 views 1 12
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you