Details
-
Bug
-
Status: Done
-
Low
-
Resolution: Cannot Reproduce
-
6.4.0
-
None
-
SR4J Sprint 87, SR4J Sprint 104
-
7.1
Description
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) }