Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Support for Script Runner

Ranil Fernando
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 17, 2015

Hi ,

 

We are investigating to start use of Script runner plugin in our JIRA Production Environment. We would like to know if we are going to use Script runner does Atlassian will support?

Is there any security risks associated when we install script runner and start to use the plugin.

 

Best regards,

Ranil

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Champion
March 10, 2023

Hi @Jira DummyUser1

Could you please share screenshots of your DB Pickers configurations? You don't have to put the actual data, some dummy example data would be enough.

I am requesting this to better understand your question and see if I can provide a solution.

From what I understand you want to pass the value selected from the first DB  picker to the second DB picker is that correct?

Thank you and Kind regards,

Ram

Jira DummyUser1
March 13, 2023

Hi @Ram Kumar Aravindakshan _Adaptavist_ ,

Let me send you a simplified example scenario of what we are attempting to do:

Lets say we have two example tables in the DB; Table 1 and Table 2:Capture.PNG

 

We would like to have a two custom field single select style drop down lists with search ability. They will be of type Single Database Values Picker. The Custom fields will be named Field_A and Field_B for this example. 

Field_A is for selecting the initial Type selection from Table 1 and will be independent.

For Field_A we use a simple SQL query to retrieve the values that can be selected:

SELECT Type FROM Table1

 

When an option in Field_A is selected or changed by the user during creation of the Issue, the options available for selection in Field_B should be dynamically updated to display only the SubType(s) in Table 2 whose ParentTypeDBID matches the DBID of selection made in Field_A.

 

For Field_B, we are currently stuck in points:

1. We are not sure how to retrieve the String value of selected option in Field_A and form a parameterized SQL statement.

2. We are not sure how to set the configuration Field_B to re-execute the newly updated SQL to fetch new list of values when Field_A is changed

 

This is currently the search and validation SQL configuration we are using for Field_B which does not work as it will return all the entries in Table2 as options.

Capture2.PNG

 

We would greatly appreciate any example solution if possible for this scenario

Thank you

Ram Kumar Aravindakshan _Adaptavist_
Community Champion
March 16, 2023

Hi @Jira DummyUser1

From the screenshot that you have shared, it appears the approach is not correct.

You have set the same SQL for both the Retrieval/validation SQL and the Search SQL. This will only return the dbid value in the list.

If you intend for the DB Picker to display the SUBTYPE value, you need to modify the Search SQL to:

select dbid, SUBTYPE from Table2 
where SUBTYPE = ? || '%'
as shown in the screenshot below:-
db_picker_example.png
I hope the helps to solve your question. :-)
Thank you and Kind regards,
Ram
Jira DummyUser1
March 20, 2023

Hi @Ram Kumar Aravindakshan _Adaptavist_ ,

 

Thanks for the reply I will implemented this and send an update soon.

Jira DummyUser1
March 23, 2023

Hi @Ram Kumar Aravindakshan _Adaptavist_

Thank you for the reply. I attempted the implementation suggested but this solution seems to displays all values present in Table 2 without filtering.

We are looking to live filter the selectable options such that it only displays the results where the associated ParentTypeDBID is the same as the DBID selected in a previous custom field

Is there a way I can use the script to retrieve the value selected in another custom field and reference it the SQL?

 

TAGS
AUG Leaders

Atlassian Community Events