Script runner is adding custom JQL functions in version 2.1.
I would like to point out one aspect of new functionality. Maybe I am wrong, but JQL functions are slightly different from scripted fields, as names of custom fields are fully in control of administrator.
Another plugin could bring in JQL function which will clutter with user defined function. I don't know how will JIRA handle this situation, but I think it will lead to misunderstandings in the future.
I would suggest to automatically prefix every user defined name with some prefix - say if_. What are others thoughts?