Customfield table is not available in JIRA Database

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 29, 2021

Hi Guys,

Need your help, i am trying to get list of Custom fields using SQL query using Script runner resources . in Our JIRA Dev environement it's working fine while in PROD Environment it's giving an error invalid object name 'customfield'. Kindly suggest..why prod is not reading tables or table in missing from prod database. 

 

Dev Environment.PNGPROD.PNG

Thanks!

V.Y

 

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 29, 2021

You'd be far better off using the API to get a list of fields, it's far easier to work with the fields directly in a script than have to look them up every time you want to get one from a name.

But to answer the question - you are connecting to the wrong database in prod, or it's of a type that is case-sensitive and the column is called CUSTOMFIELD or Customfield or something where the case matters.

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 29, 2021

Hi @Nic Brough -Adaptavist-  actually my main aim is to get empty custom fields. I am getting data from Dev but from prod getting error . 
is there any way to get empty custom fields via REST API . 

I need empty field for cleanup purpose . We have 5000+ fields in our single instance. 


let me try to change customfield to CUSTOMFIELD. 

Thanks 

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 29, 2021

Hello @Nic Brough -Adaptavist-  I have tried CUSTOMFIELD, Customfield and customfield in every getting same error "invalid object name".

I am using ScriptRunner Resources >> Local Database Connection

Thanks

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 29, 2021

I would guess that your "local_db" database connection pool is set up to point to the wrong database.  It's either going to one that isn't responding or its empty.   Either way, it's not connecting to your Jira database.

Suggest an answer

Log in or Sign up to answer