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

How to update JQL query for the ScriptRunner custom field "Issue Picker"?

Adaptavist instructions at

https://scriptrunner.adaptavist.com/latest/jira/script-fields/issue-picker.html

said that I can modify JQL query for custom field "Issue Picker" in Behaviours, by setting "field.setConfigParam('currentJql', '<your jql query>')".

I have tried to set field parameters in Behaviour, but the list of suggested issues in this field (it is called "Purchase order") does not change.

I used the code below in Behaviour:


getFieldByName("Purchase order").setConfigParam('currentJql', 'type=Task');

 

And when I open the screen with this custom field, it is suggested to choose issues by the query, that was defined when I create this field ('type=Bug'). But if I will choose the suggested issue, and will try to submit the form - I will receive an error, that I choose the wrong issue (not 'Type=Task').


So I just wonder - how I can change the JQL for custom field "Issue Picker" in behavior? (I need to do it in behavior, because I need to suggest different issue types based on issue custom field)

 

Any help would be appreciated!

 

1 answer

Hi,

I am stuck at the same point right now.

I found out that when you start typing, the new jql query is applied. The new / filtered suggestion list is what you want. But if you clear the typed filter, you get the original list with the old jql again.

And if you select an issue, which does not match the query a validation error will occur.


So the only thing missing for this to work is, that the initial list of suggestions, with empty filter, is not updated with issues matching the new filter.

Maybe there is a way to trigger such a reload or modify the list by myself.

I found out that this is a bug, and at this moment all that we can do is just wait for a fix - https://productsupport.adaptavist.com/browse/SRJIRA-3119

Like Dave Liao likes this
Dave Liao Community Leader Jan 06, 2021

@Александр Клюков @Robin Sadlo looks like this is now fixed as of ScriptRunner 5.5.3 (released in April 2019)!

Suggest an answer

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

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

654 views 7 23
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