I am planning to automate the creation of Jira Board creation through filters using Jira Rest api's.
For this i will be creating UI in jira that will have custom fields which will get the inputs from the user.
So in order to create a filter JQL has to be given as input and initially i thought similar to basic search i can give each filter criteria as a seperate custom field and finally based on the user selection of fields i will concatenate and form the jql and create the filer. But that doesn't work out.
So now i am thinking of creating a scripted field that will mimic the functionality of advanced jql search in Jira. Is this possible and if yes how it can be achieved.Please provide example if any.Also i
If the above approach is not feasible or if that is not the best approach then kindly suggest me the best approach to get the jql filter as input from the user in a custom field in a jira screen and then validating it using java in the back end and then finally creating the filter if the jql input given by the user is valid.
What are the options to mimic the below Basic search using custom fields in Jira :

What are the options to mimic the below Advanced search using custom fields in Jira :

Please provide the approaches and examples if any and let me know if you have any other queries.