Details
-
Bug
-
Status: To Do
-
Low
-
Resolution: Unresolved
-
6.55.0
-
None
-
2.7
Description
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
- Create a new Behaviour and map it to all Projects and Issue Types
- Add a Workflow as the Guide Workflow (e.g.: Software Simplified Workflow for Project ABC)
- 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
- Ensure the Project is using a Workflow Scheme where the Sub-task is using a different Workflow than the other Issue Types
- 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.
- 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
Workaround
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"){ field.setHidden(false) }else{ field.setHidden(true) }
Attachments
Issue Links
- mentioned in
-
Page Loading...