GenericTransactionException: Commit failed, rollback previously requested by nested transaction.

Issue #248 resolved
Fidel Castro Armario repo owner created an issue

A change made in the behavior of JIRA API since JIRA 7.0 in relation with issue transition is causing an exception when trying to execute a "relative issue" using virtual fields "Execute transition (delayed execution)" or "Issue status (delayed execution)" and a condition or validator prevents the issue to be transitioned.

Relative issues are those with a relation parent-subtask or epic-story.

Example: when a parent issue is being transitioned by a child issue (relations parent-subtask and epic-story), if the child issue tries to execute a transition in the parent issue and it fails due to a condition or validation not satisfied in the parent issue, the transition will fail because the two transitions are being treated as a unique transaction. This problem also happens when the parent issue tries to execute a transition on its children issues.

The exception looks like this in the log file:

2016-02-22 13:31:51,313 http-nio-8080-exec-18 ERROR admin 811x2534x1 1yc3u2m 0:0:0:0:0:0:0:1 /secure/WorkflowUIDispatcher.jspa [c.a.jira.transaction.TransactionSupportImpl] Unable to commit transaction : Commit failed, rollback previously requested by nested transaction.
org.ofbiz.core.entity.GenericTransactionException: Commit failed, rollback previously requested by nested transaction.
    at org.ofbiz.core.entity.TransactionUtil.commitLocalTransaction(
    at com.atlassian.core.ofbiz.util.CoreTransactionUtil.commit(
    at com.atlassian.jira.transaction.TransactionSupportImpl$TransactionImpl.commit(
    at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(
    at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(
    at com.atlassian.jira.bc.issue.DefaultIssueService.transition(
    at com.atlassian.jira.web.action.workflow.SimpleWorkflowAction.doExecute(
    ... 1 filtered
    at com.atlassian.jira.action.JiraActionSupport.execute(
    ... 7 filtered
    at javax.servlet.http.HttpServlet.service(
    ... 50 filtered
    at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(
    ... 27 filtered
    at com.atlassian.labs.httpservice.resource.ResourceFilter.doFilter(
    ... 75 filtered
    at com.atlassian.fastdev.AutoReloadFilter.doFilter(
    ... 55 filtered
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$
    at org.apache.tomcat.util.threads.TaskThread$

A workaround to avoid this problem is using "Filtering by field values" parameter in "Write field on linked issues or subtasks" and "Write field on issues returned by JQL query" post-functions , or conditional operator ? : in "Copy a parsed text to a field" in order to pre-validate that the conditions and validations in the issue to be transitioned are going to be satisfied, and this way ensure that we won't attempt a transition until we are sure that it will be successful.

For the moment, recipes in the documentation site of the plugin involving linked issues, subtasks and paren issue transition have been modified to explain this workaround.

Comments (4)

  1. Log in to comment