-
Type:
Bug
-
Status: Done (View Workflow)
-
Priority:
Low
-
Resolution: Done
-
Affects Version/s: 6.4.0
-
Fix Version/s: 6.10.0
-
Component/s: Behaviours
-
Labels:None
-
Sprint:SR4J Sprint 87
-
Critical Points:4.9
Steps to reproduce the problem:
- Create a behaviour mapping to project AA and issue type Bug only.
- Set description field to required using the UI toggle option.
- Go to Create Issue and change the issue type to Bug. We can see the description field is required but don't enter any value in it and click submit.
- You will force to enter the value in the description. Now, change issue type to Epic.
- Click submits to create the issue but you will not able to proceed.
Demo - screen recording 2020-08-18 at 3.48.56 pm.mp4
Expected Behaviour
The behaviour mapping should run based on the selected issue type.
Workaround
- Set to all projects and issue type mapping.
- Add the script below in the Initialiser section:
def field1 = getFieldByName("Field Name 1") // change field name 1 to the valid field name def field2 = getFieldByName("Field Name 2") if(issueContext.issueType.name == "Task") //issue type that will trigger the field required { field1.setRequired(true) field2.setRequired(true) } else { field1.setRequired(false) field2.setRequired(false) }