Custom JQL functions name cluttering

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?

6 answers

1 accepted

This widget could not be displayed.

Hrm.... I have kept it to a minimum, there aren't very many functions (although each one can do a lot).

Also, the majority of them will only appear if you enter "issueFunction in ...", and not "issue in ...". (If not, which version are you using?).

However there is only one namespace for jql functions, so it's possible for one to trample on another. This has been discussed before... also there is only one namespace regardless of the type the function supports.

BTW if this is specifically about scriptrunner, you can disable individual functions in Admin -> Scripted JQL Functions, or disable the whole lot by disabling the plugin module.

> I would suggest to automatically prefix every user defined name with some prefix - say if_. What are others thoughts?

I think that would be a poor experience for the users, and means you need to type X characters before even getting anything meaningful from the autocomplete. What does the if_ mean in your example?

What I think is that there should be a nicer way of picking functions, and with getting help on the arguments.Vote for https://jira.atlassian.com/browse/JRA-30853 !

... votes ...

I think it's immensely clunky to start messing around with function names with prefixes and subscripts. Keep them simple and flexible. But having a help text available while you're trying to work out what you're doing is a really good way to solve the problem. Users can be informed exactly what they're doing and you can use nice names for functions.

You are right - if are talking about issueFunction related functionality - those function will really appear only in that context. Well, if_ = issueFunction ;-)

Those literal generating functions were of my concern. I was writing that question when I was trying to recall what function it - hasLinks or linkedIssuess, or what the hell. Anyway, JQL editor is of help there as it is offering only functions for the given field type.

Ah - voted for inline help - this would help heavily.

This widget could not be displayed.

But good question. Just a reminder that 2.1 is actually 2.1-BETA... still finalising.

This widget could not be displayed.

Oh, good spot on the custom field thing. It was the only way possible to do it and get good performance, plus flexibility. Some day I will write a followup post to the discussions we had about jql functions. There are no leones, I've slayed them all ;-) But seriously, if writing your own function you have a choice to use "issue in ... " and return a list of QueryLiterals, or issueFunction and return a lucene query. There is a massive performance "bug" with issue functions imho.

This widget could not be displayed.

Yes I analyzed it quickly and found those two possibilities. There is some problem with rendering source of provided functions so I haven't dig deeper to query construction internals.

This widget could not be displayed.

Hrm... works ok for me. Let me know about any error if you like. Most of the code is shipped uncompiled so you can look in the jar too.

This widget could not be displayed.

Oops, my fault - view source for built-in JQL functions works as expected.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

72 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you