Guys,Hi. I have custom script, that adds and deletes watchers, depending on the transition. It work great, but i can't add watcher when issue created, first step. Only first, another work great.
I have error:
2023-02-09 09:24:28,400 ERROR [workflow.AbstractScriptWorkflowFunction]: Workflow script has failed for user ''. View here: https://ji/secure/admin/workflows/ViewWorkflowTransition.jspa?workflowMode=live&workflowName=Software+Simplified+Workflow+for+Project+ED&descriptorTab=postfunctions&workflowTransition=1&highlight=1 java.lang.NullPointerException at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:877) at com.google.common.cache.LocalCache$LocalManualCache.invalidate(LocalCache.java:4898) at com.atlassian.jira.issue.watchers.DefaultWatcherManager.updateWatch(DefaultWatcherManager.java:175) at com.atlassian.jira.issue.watchers.DefaultWatcherManager.startWatching(DefaultWatcherManager.java:92) at com.atlassian.jira.issue.watchers.DefaultWatcherManager.startWatching(DefaultWatcherManager.java:83) at com.atlassian.jira.issue.watchers.WatcherManager$startWatching$0.call(Unknown Source)
I read that the issue has not been created yet, so I can't add it. Will delay help me? and how to make it?
Yes,i know,i can use listener, but i want do all in postfunction 1 file.
Hi @Руслан
If you use a post function then this is running after the transition happens. Try to move your post function on the final slot (below "fire a listener"). Try that and let me know if this works.
Hi, @Alex Koxaras _Relational_ honestly, i dont undestend, what i need to do.
If you can, say more for small example.
my code :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
On the transition you are pointing with the arrow, once you click it, a pop up will appear. Click on "post function" and then move your post function on the end of the list:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online 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.