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

Database Custom Field not working with custom field parameter

I have a query where I want to add a static row to a return.  I am doing a UNION to add in the extra row.  Below is the query.  It returns data just fine when i hardcode 526595 for the customfield value


p.program_name AS pname,
p.program_key AS pkey
program p
p.client_number = {customfield_10428}
p.client_number AS pkey
program p
p.client_number = {customfield_10428}


Is there something wrong with my query when I change to a custom field?  Also, when i try to revert back to one that worked prior, it errors out for a bit.  Does something cache the config for a bit?   Is there a log I can check?  Nothing is showing in the atlassian-jira.log file.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted

Hi Dave,

What type of custom field is customfield_10428? You can see the supported fields for dynamic queries here:


Best Regards,

It is a text field.  the program_key field is an integer.  I tried doing CAST({customfield_10428} as INT).  It worked when querying the DB (using '526595' for the custom field) just fine.

p.program_name, p.program_key
program p

p.client_number = {customfield_10428}
order by p.program_name asc


This exact query works from one server, but not another.  There are other connections to the database that are working on both servers.

Try to set the log level to DEBUG as described here: and check for some relevant information. :smile:

Is there a specific logging level I can turn on/up to see what is being sent to the database?

Yes, set it on debug.

i tried debug and trace.  I am not seeing my query anywhere in atlassian-jira.log

well, it was a stupid plugin trick (I refuse to call it a stupid HUMAN trick here)

That custom field was not on the screen, even though it was being populated on the back end.  Adding it to the screen fixed it.


Resolving as turning up the logging helped identify.   Thanks!

Can you explain this solution better?


Community showcase
Posted in Europe

Christian Reichert, Björn Döhler, re:solution: Video and Slides online

Not one, but two f***ing legends busting myths about passwords and user management. From left to right: Christian Reichert and Björn Döhler from re:solution going on a grand tour. Video here:  h...

13 views 0 1
View post

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