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

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 !

... 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.

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

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.

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.

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.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Jira

Updates to give you visibility into what's coming in Jira Server and Data Center

Hello, Community! My name is Gosia and I'm a Product Manager on Jira Server and Data Center here at Atlassian. Since 2002 when we launched our public issue tracker, jira.atlass...

551 views 1 14
Read article

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