Exception with jetbrains-youtrack-taskAssignee workflow enabled

Hi,
im using version 5.0.2

when i try to enable default jetbrains-youtrack-taskAssignee workflow rule, i cannot switch State, exeception thrown

rule Set logged in user as Assignee when task State becomes 'In Progress' 
 
when State != null && State.becomes({In Progress}) { 
  if (Assignee == null) { 
    Assignee = loggedInUser; 
  } 
}
prettyPrint();



02 Sep 2013 19:46:38,255 ERROR [Rule ] [issue/WLAPI-100] [rkolohanin@127.0.0.1] Workflow runtime exception
jetbrains.mps.webr.runtime.templateComponent.LocalizedLogicException: Cannot set value to custom field Assignee
jetbrains.mps.webr.runtime.templateComponent.LocalizedLogicException: Cannot set value to custom field Assignee
 at jetbrains.youtrack.workflow.wrappers.CustomReferenceFieldValueResolver.set(CustomReferenceFieldValueResolver.java:89)
 at jetbrains.youtrack.workflow.wrappers.EntityWrapper.set(EntityWrapper.java:197)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
 at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
 at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2408)
 at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:282)
 at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
 at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
 at org.mozilla.javascript.gen.c88._c16(initialscript.js:125)
 at org.mozilla.javascript.gen.c88.call(initialscript.js)
 at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
 at org.mozilla.javascript.gen.c89._c2(jetbrains-youtrack-taskAssignee->Set logged in user as Assignee when task State becomes 'In Progress':5)
 at org.mozilla.javascript.gen.c89.call(jetbrains-youtrack-taskAssignee->Set logged in user as Assignee when task State becomes 'In Progress')
 at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
 at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
 at org.mozilla.javascript.gen.c89.call(jetbrains-youtrack-taskAssignee->Set logged in user as Assignee when task State becomes 'In Progress')
 at org.mozilla.javascript.JavaAdapter.doCall(JavaAdapter.java:578)
 at org.mozilla.javascript.JavaAdapter.callMethod(JavaAdapter.java:553)
 at adapter2.action(<adapter>)
 at jetbrains.youtrack.workflow.model.StatelessRule.handle(StatelessRule.java:45)
 at jetbrains.youtrack.workflow.model.StatelessRule$1.invoke(StatelessRule.java:91)
 at jetbrains.youtrack.workflow.model.RhinoRuleLoader.runInContext(RhinoRuleLoader.java:83)
 at jetbrains.youtrack.workflow.model.StatelessRule.handleBeforeFlush(StatelessRule.java:84)
 at jetbrains.youtrack.workflow.ext.WorkflowIssueListener.beforeFlush(WorkflowIssueListener.java:137)
 at com.jetbrains.teamsys.dnq.database.TransientSessionImpl$4.visit(TransientSessionImpl.java:1053)
 at com.jetbrains.teamsys.dnq.database.TransientEntityStoreImpl.forAllListeners(TransientEntityStoreImpl.java:315)
 at com.jetbrains.teamsys.dnq.database.TransientSessionImpl.notifyBeforeFlushListeners(TransientSessionImpl.java:1050)
 at com.jetbrains.teamsys.dnq.database.TransientSessionImpl.beforeFlush(TransientSessionImpl.java:945)
 at com.jetbrains.teamsys.dnq.database.TransientSessionImpl.flushChanges(TransientSessionImpl.java:728)
 at com.jetbrains.teamsys.dnq.database.TransientSessionImpl.flush(TransientSessionImpl.java:156)
 at jetbrains.youtrack.agile.sprint.rest.VersionSprintSubresource.moveIssue(VersionSprintSubresource.java:587)
 at jetbrains.youtrack.agile.sprint.rest.VersionSprintSubresource.post_IssueIssue(VersionSprintSubresource.java:413)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
 at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
 at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
 at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1483)
 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353)
 at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)
 at jetbrains.mps.webr.rpc.rest.runtime.DefaultRestRequestHandler.handle(DefaultRestRequestHandler.java:185)
 at jetbrains.mps.webr.runtime.requestProcessor.RestRequestProcessor.processRequest(RestRequestProcessor.java:47)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.processRequest(MainServlet.java:228)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.doGet(MainServlet.java:114)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.doPost(MainServlet.java:192)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at jetbrains.mps.webr.runtime.filter.QueryParameterFilter.doFilter(QueryParameterFilter.java:25)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at org.eclipse.jetty.continuation.ContinuationFilter.doFilter(ContinuationFilter.java:137)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:82)
 at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:242)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:91)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:223)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:107)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:75)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:934)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:90)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:494)
 at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:632)
 at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:281)
 at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2185)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:724)
2 comments
Comment actions Permalink
Hi Zuzmic,

most likely the logged in user isn't project assignee, so it cannot be assigned to 'Assignee'.

To solve the problem please add the logged in user into the project assignees.
0
Comment actions Permalink
most likely the logged in user isn't project assignee, so it cannot be assigned to 'Assignee'.


Thank you,
user was creator, but not in assignees for project
0

Please sign in to leave a comment.