Using a Server-side Validator to set the Fix Versions Required
On this page, we provide you with an example of how to set the Fix Version/s field as required using a server-side script in a Behaviour. For example, when you mark an issue as Resolved with the resolution of Fixed, you want the developer to specify the Fix Version/s. You may also want to hide this field if the resolution is any other resolution, such as Won't Fix.
The following example will only work if your project has the following:
- A workflow status with a Resolved status and Resolve Issue transition (or something similar)
- A Resolve Issue transition with a screen associated with it.
- A Resolve Issue transition screen that includes the Resolution and Fix Version/s fields.
- A Resolution field value of Fixed.
You can test to see if this behaviour works. The Fix Version/s field will display as required when the resolution of Fixed is selected. The field will also display a warning if a user tries to transition the issue without adding the fix version.
The Fix Version/s field will disappear if any other resolutions are selected.