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

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 - showing results based on other custom field Edited

Hello,

 is there a way to get the Database Picker show results based on a choice of a different field during an issue creation? (Which would be also a DTB Picker field)

 I tried to reference the custom field in Search query (just like I do for an other DTB Field plugin) "{customfield_1234}" but the ScriptRunner doesn't seem to like it very much, saying it is not a proper SQL...

 Thank you for you suggestions

Lukas

1 answer

1 accepted

0 votes
Answer accepted

I am not aware of a way to inject anything other than then user's input into the DTP scripted field.

What might be an option for you is to use a regular text field to hold your data then use Behaviors' converToSingleSelect method to implement the drop-down behavior.

https://scriptrunner.adaptavist.com/5.6.8.1-jira8/jira/behaviours-conversions.html#_walkthrough_choose_from_a_database_table

You will need to configure a separate REST API to perform your SQL query, but then you will have 100% control over what you want to supply to that query and how to return the results.

Thank you for the suggestion, I'll try to do that.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

225 views 2 5
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