Sanitizing JQL functions
If you don't want to make your JQL function violate the strict security aspects of your JIRA instance, sanitizing the JQL functions is a must! So, what does this actually mean?
Imagine a filter created by you to find out issues in a pre-defined set of projects. What will happen if you share the filter with a friend of yours who is not supposed to see the project or know that the project existed? The person with whom you shared it won't be able to modify the issues in the protected project due to JIRA's permission schemes but he/she will surely see the name of the project in the JQL query that is used in the filter!
This is where sanitizing of the JQL function will help. In essence, we just modify the JQL query to protect the arguments in line with the permission schemes. Let us see an example of doing that by sanitizing the JQL function we created in the previous recipe.
Getting ready
Develop the JQL function, as explained in the previous recipe.
How to do it...
In our...