Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

ScriptRunner Database picker: custom script and SQL fields?

This is a question specifically about the Adapativist ScriptRunner "Custom Field" of type "Database Picker".  (This question is here because the Adaptavist documentation specifically says questions about the plugin should be posted in this community)

I am attempting to follow documentation as laid out here:

For design reasons, my team and I want to use the 'Configuration Script' field of the Database picker to override the search and validate options on this fields.

We have implemented our 'getSearchSql' and related functions in the Configuration Script as recommended in the documentation. HOWEVER, when I try to preview our custom functions, I get the following:

Screen Shot 2020-08-20 at 12.16.43 PM.png

Now, we have DELIBERATELY left these blank because we override them in the Configuration Script field.  The form doesn't care. 


So my question is:

1. Is this a bug or a feature?

2. What goes in the boxes such that they will be ignored in favor of our custom script?

This MUST be possible- there are example snippets that perform this override. But I can't make it work with my code setup.


2 answers

Update: here's an example of my problem: I want to run a query using the database picker that SHOULD NOT use the user input to show options (this may seem silly here but the actual use case is more customized than that). It appears with the current plugin that I can't do this without some dummy SQL that is definitely getting run even though the override is ALSO getting run and is what controls the results. Basicially, SQL is getting run twice and should not be. 

The screenshot below shows what happens.


Screen Shot 2020-08-20 at 12.47.21 PM.png

I'm studying this new feature as well and here's my understanding:

If you want to query WITH user input, then you use retrieval/validation and search SQL to do query, and the configuration script to do some filtering.

If you want to query WITHOUT user input, then just use retrieval/validation and search SQL to do query, while leaving configuration script blank.

Just in case anyone needs this: if you're running Jira Service Desk Server and you want to use this new Configuration Script feature, you might need to upgrade your JSD as well. Mine did not function correctly until I did the upgrade.

Suggest an answer

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

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

133 views 0 4
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