Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-65928

"Commit failed, rollback previously requested by nested transaction" error in JIRA 7 when parent condition blocks child transition

    XMLWordPrintable

Details

    Description

      I am experiencing an issue with the recent changes to JIRA behaviour in regards to having linked parent and sub-task items. The specific workflow I have previously used is as follows.

      Workflow

      • I have a "stories" workflow which contains "Selected for Development", "In Progress", "Awaiting test", "Done" states and global transitions.
      • I have a "tasks" workflow which contains "Selected for Development", "In progress", "Awaiting test", "Ready for Release" states.
      • The "tasks" workflow has post functions in it's transitions to push through stories to "In progress" as soon as any sub-task of that story is "In Progress" or "Awaiting test". Likewise for pushing stories back in to "In progress" upon test failures, etc. These post function transition changes are using the names for the global transitions in the "stories" workflow.
      • The "stories" workflow has sub-task blocking conditions on it's global transitions to prevent the story transitioning to an invalid state if further sub tasks are created (e.g. the story can't go from "In progress" to "Awaiting test" until all of it's sub-tasks are "Ready for release").

      Result

      This results in failed transactions in the situation where the parent "story" item has a sub-task blocking condition that means the story can't be transitioned to the requested state. This in turn causes the entire transaction to roll back for the sub-task.

      I had previously fixed this using Groovy expressions to determine when the parent story was in the correct state, and only trigger the transition under these circumstances. Since Groovy expression support has now also been disabled for JIRA cloud, there is no way to achieve this behaviour any more.

      This in turn is going to lead to more team overhead in having to keep track of stories and what state their sub-tasks are in.

      I am raising this new issue off the back of discussions with Innovalog in this issue: https://jira.atlassian.com/browse/JRA-44681

      Innovalog are updating JIRA Misc Workflow Extensions to warn instead of error when an invalid parent state is specified (taken from linked issue):

      Workaround provided by David from Innovalog

      Use transition Names instead of Transition IDs when specifying the Transition to execute on the Parent (or Linked) Issue. When you use transition names, if the specified transition is not applicable for the current status of the parent (or linked) issue, a WARN will be logged but the current transition (on the subtask) will complete successfully.
      A fix will be applied shortly to JMWE to provide the same behavior when specifying transition IDs.

      Whilst I understand that the new JIRA behaviour is probably more correct, and that transactions should be fully atomic and roll back, as they now do, this behaviour is undesirable in the workflow scenario I describe above. The approach that seemed most correct was to only trigger a parent transition if the parent's sub tasks were in a set of "correct" states, as per the Groovy expression behaviour I initially implemented as a workaround for this change.

      Since this is now not possible, I can't see another way to make the above approach work.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              e9b621fd07ae Sean Bedford
              Votes:
              7 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: