Make the "Block transition until approval" condition work for any transition in the workflow

XMLWordPrintable

    • 1
    • 6

      Summary:

      In Service Desk, there is a condition called "Block transition until approval" which is used by workflow with approval status.
      This condition only works for the 2 transitions which are connected to the status with approval, but it has absolutely no effect if it is added to any other transition in the workflow.

      Steps to reproduce:

      • Create a fresh Service Desk project
      • Take a look at the default workflow with approval "Service Request Fulfilment with Approvals workflow for Jira Service Desk", and notice that:
        • the status "WAITING FOR APPROVAL" is configured by default with an Approval:

        • the "Transition when approved" setting is mapped to the transition "Approved", and the "Transition when declined" setting is mapped to the transition "Declined"
        • the "Declined" and "Approved" transitions are automatically configured with the condition "Block transition until approval" (="Issue transition will be blocked if there is a pending approval):

      • Edit this workflow by adding the condition "Block transition until approval" to the transition "Cancel Request" which is connected from the status "WAITING FOR APPROVAL" to the status "CANCELED"

      • Publish the workflow
      • Create a new request using this workflow, with user1 as the reporter and user2 as the approver
      • Open the request by being logged in as user1
      • Check that:
        • the request is in the status "WAITING FOR APPROVAL"
        • the 2 transitions used in the approval configuration "Approved" and "Declined" are blocked as expected, since they can only be executed by the approver "user2"
        • however, the "Cancel Request" transition is still available and working, despite the condition "Block transition until approval"

      Suggested solution:

      It has been confirmed that this current behavior is intended by design (according to how the code was implemented), and is due to some workflow limitation.
      However, this behavior is not ideal and is confusing, since the workflow allows us to add the condition "Block transition until approval" to any transition, even though it has no effect.

      2 possible solution to this problem:

      • either make this condition effective when it's added to any transition in the workflow
      • or don't allow this condition to be added to any transition, since it has no effect anyway

        1. RequestToBeApproved_CancelStatusShowing.png
          406 kB
          Julien Rey
        2. WorkflowScreenshot1.png
          233 kB
          Julien Rey
        3. WorkflowScreenshot2.png
          153 kB
          Julien Rey
        4. WorkflowScreenshot3.png
          99 kB
          Julien Rey
        5. WorkflowScreenshot4.png
          97 kB
          Julien Rey
        6. WorkflowScreenshot5.png
          106 kB
          Julien Rey
        7. WorkflowScreenshot6.png
          223 kB
          Julien Rey

            Assignee:
            Unassigned
            Reporter:
            Julien Rey (Inactive)
            Votes:
            59 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated: