Plugin 'ScriptRunner' defined a function with the name: 'hasattachments' but one with that name already exists.
*This issue has moved*
This issue has been moved permanently to Adaptavist's Product Support JIRA instance.
All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the
Can't access your account link in order to reset to a new password.
OK... I'm going to close this because it's not in my powers to fix.
https://jira.atlassian.com/browse/JRA-24219 is the closest issue I could find, and I added a comment.
Regarding your points:
> Sometimes the competing functions operate in different ways and so you really do want to have access to both!
That's not possible, unless you want to do some coding, eg override one of the built-in functions to give it a different name. Besides, I think it would be very confusing to the users.
Points 2) and 3)
Filters should not break, if another plugin provides hasAttachments for instance they will continue to work.
I have added to the documentation more information on what to do in this scenario, it will be available at the next release.
, I totally understand that the problem can ultimately only really be addressed by Atlassian themselves... by providing a framework where JQL functions provided by different plugins cannot clash.
I have not been able to find a logged issue relating to this on jira.atlassian.com.
Could I beg a favour? That you be the one to log the issue... thus ensuring that the wording is couched optimally. Then we can all go and vote the the issue!
It does help that Scriptrunner now allows selective disabling of modules such as "Scripted JQL Function - hasAttachments". That was not possible when I first ran into the "JQL Function clash" a couple of years ago. However, it's a workaround that has three problems:
Sometimes the competing functions operate in different ways and so you really do want to have access to both!
Disabling a function will break filters that use that function. Is their a way (scriptrunner script?) that will identify such filters?
Disabling a function will break queries used in Confluence's "JIRA Issues Macro".
Not really... it may be that you are upgrading SR, in which case that function would already be defined. Besides, you could ask the author of JQL tricks to check the same thing.
If I am so cautious but no one else is my functions would never win. It's up to the users to decide which ones they want, but ultimately i's an issue for Atlassian to solve.
Is not possible to check if a function name is already registered? I guess it should be possible even if with just a JQL execution. If the hasattachments is not defined, it should enable this module.