Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-9365

Jelly TransitionWorkflow action name does not always work

    • Icon: Support Request Support Request
    • Resolution: Answered
    • Icon: Medium Medium (View bug fix roadmap)
    • 3.7
    • 3.5.1
    • None
    • None

      The <jelly:transitionWorkflow> tag seems broken in various ways. Given an open issue, the following:

      <JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.JiraTagLib">
      <jira:TransitionWorkflow key="TP-3" workflowAction="Start Progress"/>
      </JiraJelly>

      results in:

      005-08-19 17:59:21,569 ERROR [web.action.util.JellyRunner] Could not run script.
      org.apache.commons.jelly.JellyTagException: null:2:0: <jira:TransitionWorkflow> java.lang.NullPointerException
      at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:682)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:288)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
      at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:111)
      at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:151)
      at com.atlassian.jira.web.action.util.JellyRunner.doExecute(JellyRunner.java:93)
      at webwork.action.ActionSupport.execute(ActionSupport.java:153)
      at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:47)
      at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132)
      at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:186)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
      at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
      at com.atlassian.jira.web.filters.AccessLogFilter.doFilter(AccessLogFilter.java:51)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
      at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
      at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:38)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:182)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:177)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132)
      at com.atlassian.jira.web.filters.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:25)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.jira.web.filters.ActionCleanupDelayFilter.doFilter(ActionCleanupDelayFilter.java:37)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:91)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.jira.web.filters.gzip.GzipFilter.doFilter(GzipFilter.java:72)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:36)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.caucho.server.http.Invocation.service(Invocation.java:315)
      at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
      at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
      at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
      at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.NullPointerException
      at com.atlassian.jira.issue.fields.screen.FieldScreenRendererImpl.init(FieldScreenRendererImpl.java:85)
      at com.atlassian.jira.issue.fields.screen.FieldScreenRendererImpl.<init>(FieldScreenRendererImpl.java:64)
      at com.atlassian.jira.workflow.WorkflowTransitionUtilImpl.getFieldScreenRenderer(WorkflowTransitionUtilImpl.java:189)
      at com.atlassian.jira.workflow.WorkflowTransitionUtilImpl.validate(WorkflowTransitionUtilImpl.java:168)
      at com.atlassian.jira.jelly.tag.issue.TransitionWorkflow.doTag(TransitionWorkflow.java:110)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
      ... 38 more
      Root cause
      java.lang.NullPointerException
      at com.atlassian.jira.issue.fields.screen.FieldScreenRendererImpl.init(FieldScreenRendererImpl.java:85)
      at com.atlassian.jira.issue.fields.screen.FieldScreenRendererImpl.<init>(FieldScreenRendererImpl.java:64)
      at com.atlassian.jira.workflow.WorkflowTransitionUtilImpl.getFieldScreenRenderer(WorkflowTransitionUtilImpl.java:189)
      at com.atlassian.jira.workflow.WorkflowTransitionUtilImpl.validate(WorkflowTransitionUtilImpl.java:168)
      at com.atlassian.jira.jelly.tag.issue.TransitionWorkflow.doTag(TransitionWorkflow.java:110)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
      at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:111)
      at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:151)
      at com.atlassian.jira.web.action.util.JellyRunner.doExecute(JellyRunner.java:93)
      at webwork.action.ActionSupport.execute(ActionSupport.java:153)
      at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:47)
      at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132)
      at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:186)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
      at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
      at com.atlassian.jira.web.filters.AccessLogFilter.doFilter(AccessLogFilter.java:51)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
      at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
      at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:38)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:182)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:177)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132)
      at com.atlassian.jira.web.filters.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:25)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.jira.web.filters.ActionCleanupDelayFilter.doFilter(ActionCleanupDelayFilter.java:37)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:91)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.jira.web.filters.gzip.GzipFilter.doFilter(GzipFilter.java:72)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:36)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.caucho.server.http.Invocation.service(Invocation.java:315)
      at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
      at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
      at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
      at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
      at java.lang.Thread.run(Thread.java:595)

      Trying to close a resolved issue:

      <JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.JiraTagLib">
      <jira:TransitionWorkflow key="TP-1" workflowAction="Close Issue"/>
      </JiraJelly>

      results in:2005-08-19 18:06:56,502 ERROR [atlassian.jira.workflow.SimpleWorkflowManager] An exception occurred
      com.opensymphony.workflow.InvalidActionException: Action 2 is invalid
      at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:528)
      at com.atlassian.jira.workflow.SimpleWorkflowManager.doWorkflowAction(SimpleWorkflowManager.java:208)
      at com.atlassian.jira.workflow.WorkflowTransitionUtilImpl.progress(WorkflowTransitionUtilImpl.java:261)
      at com.atlassian.jira.jelly.tag.issue.TransitionWorkflow.doTag(TransitionWorkflow.java:113)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
      at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:111)
      at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:151)
      at com.atlassian.jira.web.action.util.JellyRunner.doExecute(JellyRunner.java:93)
      at webwork.action.ActionSupport.execute(ActionSupport.java:153)
      at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:47)
      at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132)
      at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:186)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
      at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
      at com.atlassian.jira.web.filters.AccessLogFilter.doFilter(AccessLogFilter.java:51)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
      at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
      at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:38)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:182)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:177)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132)
      at com.atlassian.jira.web.filters.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:25)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.jira.web.filters.ActionCleanupDelayFilter.doFilter(ActionCleanupDelayFilter.java:37)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:91)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.jira.web.filters.gzip.GzipFilter.doFilter(GzipFilter.java:72)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:36)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.caucho.server.http.Invocation.service(Invocation.java:315)
      at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
      at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
      at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164)
      at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
      at java.lang.Thread.run(Thread.java:595)
      2005-08-19 18:06:56,506 ERROR [web.action.util.JellyRunner] Could not run script.
      org.apache.commons.jelly.JellyTagException: null:2:0: <jira:TransitionWorkflow> The following problems were found:
      Action 2 is invalid

      at com.atlassian.jira.jelly.tag.JellyUtils.processErrorCollection(JellyUtils.java:27)
      at com.atlassian.jira.jelly.tag.issue.TransitionWorkflow.doTag(TransitionWorkflow.java:113)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
      at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:111)
      at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:151)
      at com.atlassian.jira.web.action.util.JellyRunner.doExecute(JellyRunner.java:93)
      at webwork.action.ActionSupport.execute(ActionSupport.java:153)
      at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:47)
      at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132)
      at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:186)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
      at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
      at com.atlassian.jira.web.filters.AccessLogFilter.doFilter(AccessLogFilter.java:51)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
      at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
      at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:38)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:182)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:177)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132)
      at com.atlassian.jira.web.filters.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:25)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.jira.web.filters.ActionCleanupDelayFilter.doFilter(ActionCleanupDelayFilter.java:37)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:91)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.jira.web.filters.gzip.GzipFilter.doFilter(GzipFilter.java:72)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:36)
      at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
      at com.caucho.server.http.Invocation.service(Invocation.java:315)
      at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
      at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
      at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164)
      at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
      at java.lang.Thread.run(Thread.java:595)

            [JRASERVER-9365] Jelly TransitionWorkflow action name does not always work

            Hello,

            The Atlassian team is doing some housekeeping. We are closing this support issue due to long period of inactivity.

            If you feel this issue is still outstanding, please re-open and comment on it.


            Cheers,
            Yuen-Chi Lian

            "I do not seek. I find." - Pablo Picasso

            Yuen-Chi Lian [Atlassian] added a comment - Hello, The Atlassian team is doing some housekeeping. We are closing this support issue due to long period of inactivity. If you feel this issue is still outstanding, please re-open and comment on it. – Cheers, Yuen-Chi Lian "I do not seek. I find." - Pablo Picasso

            Hi Will,
            I just tested it out, good call. It does seem like when chaining the transition calls it is getting stuck with the first transition.
            Thanks,
            Dylan

            Dylan Etkin [Atlassian] added a comment - Hi Will, I just tested it out, good call. It does seem like when chaining the transition calls it is getting stuck with the first transition. Thanks, Dylan

            Hey Dylan. I'd just typed up a whole description of the isolated problem, code snippets, etc. But I think I've figured out what's going on!!

            After I use Jelly to "resolve" the issue, the code for "Close Issue" changes from '2' to '701' (I can tell from the links in the main UI). It appears that if I execute this code:

            <jira:TransitionWorkflow key='${issueKey}' workflowAction='Resolve Issue' user='jennifer.murdza' assignee='automatic' comment='This is fixed as of today with the addition to each feature page of the confirm method which checks that all required fields are not empty or undefined.' resolution='Fixed'/>
            <jira:TransitionWorkflow key='${issueKey}' workflowAction='Close Issue' user='ed.royfman' assignee='automatic' comment='Verified fix on SST build ver 01.'/>

            Then the "Close Issue" action is trying to call action 2, even though the correct "Close Issue" is action 701, since the issue is now in the "resolved" state from the first Jelly tag. This definitely seems like a bug in Jira.

            If I manually set the action code to '701'

            <jira:TransitionWorkflow key='${issueKey}' workflowAction='701' user='ed.royfman' assignee='automatic' comment='Verified fix on SST build ver 01.'/>

            Then it successfully closes the issue. This is a bit annoying from an automatic load perspective, though, because it means I need to keep track of which items I've closed, since the "Close Issue" action changes IDs on me. I still think the fact that "Close Issue" doesn't resolve to a valid action ID is a bug, but hopefully I can manage a workaround based on this new knowledge.

            Will Koffel added a comment - Hey Dylan. I'd just typed up a whole description of the isolated problem, code snippets, etc. But I think I've figured out what's going on!! After I use Jelly to "resolve" the issue, the code for "Close Issue" changes from '2' to '701' (I can tell from the links in the main UI). It appears that if I execute this code: <jira:TransitionWorkflow key='${issueKey}' workflowAction='Resolve Issue' user='jennifer.murdza' assignee=' automatic ' comment='This is fixed as of today with the addition to each feature page of the confirm method which checks that all required fields are not empty or undefined.' resolution='Fixed'/> <jira:TransitionWorkflow key='${issueKey}' workflowAction='Close Issue' user='ed.royfman' assignee=' automatic ' comment='Verified fix on SST build ver 01.'/> Then the "Close Issue" action is trying to call action 2, even though the correct "Close Issue" is action 701, since the issue is now in the "resolved" state from the first Jelly tag. This definitely seems like a bug in Jira. If I manually set the action code to '701' <jira:TransitionWorkflow key='${issueKey}' workflowAction='701' user='ed.royfman' assignee=' automatic ' comment='Verified fix on SST build ver 01.'/> Then it successfully closes the issue. This is a bit annoying from an automatic load perspective, though, because it means I need to keep track of which items I've closed, since the "Close Issue" action changes IDs on me. I still think the fact that "Close Issue" doesn't resolve to a valid action ID is a bug, but hopefully I can manage a workaround based on this new knowledge.

            Hi Will,
            Have you tied using the id of the Close Issue action instead of the human readable string? Also are you certain the user you are executing the script as has all the permissions they need? I was able to close an issue via jelly in my test environment so it makes me think it must be a configuration issue. Have a look and let us know.
            Thanks,
            Dylan

            Dylan Etkin [Atlassian] added a comment - Hi Will, Have you tied using the id of the Close Issue action instead of the human readable string? Also are you certain the user you are executing the script as has all the permissions they need? I was able to close an issue via jelly in my test environment so it makes me think it must be a configuration issue. Have a look and let us know. Thanks, Dylan

            I am having the same "Action 2 is Invalid" errors when trying to programmatically "Close Issue" in Jelly.

            Using 'Enterprise Edition, Version: 3.4.3-#109'

            I have tried giving users all sorts of permissions, running it as different users, administrators, etc. No luck. It's also a blocker for me towards completing my migration and bringing our team up on Jira. If there's no other option, I may just mark them all as resolved (that transition works just fine), and then close them in bulk through the UI, but I lose some workflow history doing it that way.

            Will Koffel added a comment - I am having the same "Action 2 is Invalid" errors when trying to programmatically "Close Issue" in Jelly. Using 'Enterprise Edition, Version: 3.4.3-#109' I have tried giving users all sorts of permissions, running it as different users, administrators, etc. No luck. It's also a blocker for me towards completing my migration and bringing our team up on Jira. If there's no other option, I may just mark them all as resolved (that transition works just fine), and then close them in bulk through the UI, but I lose some workflow history doing it that way.

              Unassigned Unassigned
              453a96c04a99 Will Koffel
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: