Hello,
I am trying to create a DB picker field which has multiple values. Currently I need these values to restrict based on projects. Is there any way to do this ?
Hi @Jeyanth Kumar
Welcome to the community!
In your description, you mentioned:-
I am going to assume that you want the DB Picker options to be filtered according to the Project it is applied in. Please clarify if this is what you are trying to achieve.
If yes, this is doable; the Best approach would be to use ScriptRunner's Behaviour.
Let me know so I can provide an example.
Thank you and Kind regards,Ram
Hello @Jeyanth Kumar and welcome to the Community! I have not used the Data Picker field but it looks like you can use a "Retrieval/validation SQL" script to achieve what you want. There are some sample scripts (provided you are using a recent version of SR).
Hi @Ram Kumar Aravindakshan _Adaptavist_ ,
Thanks for replying. I am aware of using scriptrunner behaviour but I need to use Database picker field and I have nearly 500 projects in Jira. So the purpose is basically, I need 500 values from DB picker field and this is again filtered in each project. So basically the DB picker should show either 1 or 2 values for each project.
Hope my requirement is clear for you. Thanks in advance
Best regards
Jeyanth
Hi @Laurie Sciutti ,
Thanks for replying. I have used the examples but my case is. I have to use an SQL like this.
select a.col5
from a.tab1, b.tab2
where a.col3=b.col5 and a.col2 = 12406 and b.col3 = {project}
order by a.col5
Here in this SQL col3 from table b is projectkey which is based dynamically.
Hope this helps.
I have to use an SQL like this.
Please share a screenshot of your DB picker configuration.
From the query structure you have shared this will not work on the Retrival and Search SQL field.
It's more for the display value.
Thank you and Kind regards,
Ram
It looks like you're new here. Sign in or register to get started.