Hello,
Our script listeners do not appear anymore in the page where they should be viewed.
We can still add others, and they still work, as we can see their effects, but we cannot modify already added ones because we cannot see them.
I added a screenshot to be more clear.
Running the below in our database:
SELECT * FROM PROPERTYTEXT left join PROPERTYENTRY on PROPERTYTEXT.ID = PROPERTYENTRY.ID where PROPERTY_KEY='com.onresolve.jira.groovy.groovyrunner:groovyrunner';
gives us the following result:
empty.png
If we run:
\copy (SELECT * FROM PROPERTYTEXT left join PROPERTYENTRY on PROPERTYTEXT.ID = PROPERTYENTRY.ID where PROPERTY_KEY='com.onresolve.jira.groovy.groovyrunner:groovyrunner') To '/tmp/testingview.csv' With CSV Delimiter ','
all existing script listeners get copied into a csv;
When removing all script listeners, the database shows correct results:
image2017-3-1 10:17:49.png
When starting to add them back, after a few are added, they just randomly disappear. When they can still be viewed in JIRA, they also appear in the database.
Any ideas?
Thank you!
Hello @Tomas Arguinzones,
Were you able to resolve or troubleshoot the issue in some specific way? Unfortunately, I have faced the same problem with script listeners (and script fields) on my end.
Hi John...sorry for the delayed response (I was on vacation). Yes, I did fix it. It is most likely one or more of your listeners got duplicated somehow. Please run this script to verify:
import com.onresolve.scriptrunner.runner.ListenerManagerImpl
import com.onresolve.scriptrunner.runner.util.OSPropertyPersister
import groovy.json.JsonBuilder
def listeners = OSPropertyPersister.loadList(ListenerManagerImpl.CONFIG_LISTENERS)
new JsonBuilder(listeners).toString()
You need to find which listener(s) is duplicated and remove the duplicated. You can also run the built-in script that get the list of the script registry and check there if you see any listeners/script fields duplicated. Once you determine/find the duplicates, run the following script from the script console to delete the duplicates:
import com.onresolve.scriptrunner.runner.util.OSPropertyPersister import com.onresolve.scriptrunner.runner.ListenerManagerImpl import com.onresolve.scriptrunner.runner.ListenerManager import com.onresolve.scriptrunner.runner.ScriptRunnerImpl def listenerManager = ScriptRunnerImpl.getPluginComponent(ListenerManager) as ListenerManager List newlist = OSPropertyPersister.loadList(ListenerManagerImpl.CONFIG_LISTENERS) def node = newlist.find {it.FIELD_FUNCTION_ID = '6d5021232c9004347760ea09e439aeb030a4150f'} //-<GET YOUR ID HERE newlist.remove(node) OSPropertyPersister.save(newlist, ListenerManagerImpl.CONFIG_LISTENERS) listenerManager.refresh() newlist
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Cristina_Abunei how did you fix this? I am having the same issue where I can not see any of my script listeners...all of the sudden they are not loading.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem seems to have solved itself mostly, because we did not change a listener and we were not really able to find a problematic one.
We added them all again (lucky for us we had them stored elsewhere too), and they disappeared again, and then we added them all again and they haven't disappeared.
Also, for us, when it happened, they were somehow only missing from the interface, as their effects were still happening.
Sorry I don't have a clear solution, but I would also try what Jonny suggested in the above comment, perhaps there is a problematic one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We tend to see this when one or two listeners have serious compilation problems.
You mentioned that after adding a few listeners manually, the problem resurfaces. It might be worthwhile to specifically note which listener it is that seems to break the UI when you add it. Try adding a listener and refreshing the page one at a time until you find the problematic listener. You can then add its code to your question here or in another question for review.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.