Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Database picker search SQL based on custom field


Could you help me.
I need get value from sql. I wrote script. but value in database picker not value and show error.

import com.onresolve.scriptrunner.canned.jira.fields.editable.database.SqlWithParameters
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue

def customFieldManager = ComponentAccessor.getCustomFieldManager()
def lotTovara = customFieldManager.getCustomFieldObject("customfield_13001")

getSearchSql = { String inputValue, Issue issue ->
new SqlWithParameters("select OFFCNT_NAME from KSAS_DCT.OFFER_CONTENT WHERE OFFCNT_NAME like '%' || ? || '%'", [issue.getCustomFieldValue(lotTovara) ?: '', inputValue])


1 answer

1 accepted

0 votes
Answer accepted

I resolve problem.

Hi alex, can you share how did you solve this?




how did you resolved this. Please share

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Service Management

Jira Service Management Documentation Opportunities

Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...

308 views 0 9
Join discussion

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