Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-6042

Behaviour Workflow Action Condition gets incorrectly triggered in Issues with different Workflow



    • Bug
    • Status: To Do
    • Low
    • Resolution: Unresolved
    • 6.55.0
    • None
    • Behaviours
    • 2.7


      When using Workflow Action Condition in Behaviour, it seems it is getting incorrectly triggered in mapped Issue that is using a different Workflow than the one set as the Guide Workflow. It seems that the Condition is being triggered based on the Action ID, so it also gets triggered in Issues with different Workflow but shares the same Action ID.

      Steps to Reproduce

      1. Create a new Behaviour and map it to all Projects and Issue Types
      2. Add a Workflow as the Guide Workflow (e.g.: Software Simplified Workflow for Project ABC)
      3. Add the Issue Type Field into the Behaviour, set the following configurations:
        • Enable 'Hidden'
        • Add Conditions: Except > Workflow Action > Create
          You can use any Workflow Action that shares the same Action ID as other Workflow
      4. Ensure the Project is using a Workflow Scheme where the Sub-task is using a different Workflow than the other Issue Types
      5. In any Issue Type other than Sub-task, check that the Issue Type field is only shown in the set Condition. In this example, it should only appear when in the Create Action/Transition. Others would have the field hidden.
      6. Now check in the Sub-task Issue Type

      Expected Behaviour

      In Sub-task Issue Type, the Issue Type field will always be hidden, as it will not meet the 'Except' Condition since it is using a different Workflow

      Actual Behaviour

      The Sub-task Issue Type will have the Issue Type field shown when in the Create Action/Transition, despite it using a different Workflow.

      Replication video: BehaviourWorkflowActionConditionBug.mp4


      Rather than using the Condition, in the field server-side script, use getActionName() to fetch the Action/Transition name and use it as a Condition in an IF-ELSE statement:

      def action = getActionName() as String
      def field = getFieldByName("Issue Type")
      if (action == "Create" || action == "To Do"){


        Issue Links



              Unassigned Unassigned
              imazuki Irfan Mazuki
              3 Vote for this issue
              5 Start watching this issue