YouTrack Standalone 2020.2 Help

Required Custom Fields

In some situations, you may want to require input for a specific field without setting a default value. Mandatory fields can help you when a particular field is critical for generating a report or is used for issue lifecycle management.

The Empty Value setting for any custom field can be configured on a per-project basis. On the Custom Fields Settings page, this configuration is only available from the Fields in Projects tab. The option that you choose for this setting determines whether the field is required when an issue is reported in the selected project.

  • For fields that store a simple type (string, date, period, integer, or float), the field is required when the Empty Value option is set to Cannot be empty.

    Required field simple type administration

  • For fields that store an enumerated type, the field is required when Empty Value option is set to Cannot be empty and the Default Value option is set to No value (required).

    Required field enumerated type administration

When a user reports an issue in the project, required fields are shown with the message Set value in the input field.

Required fields in new issue

Before you require a field in a project, consider the following consequences:

  • If you require manual input for a field that is also private, users who don't have permission to read and update private fields are blocked from creating issues in the project.

  • If you take a field that is shown on a conditional basis and configure it as a required field, the field is only required when the condition for showing the field is met.

  • Field requirements are only checked when new issues are reported or when a user edits the required field directly. When a user moves an issue to a different project, the fields that are required in the new project can remain empty.

Using Workflows for Mandatory Fields

Before the option to require input without a default value, the only way to make a field mandatory was to use a workflow. The Due Date default workflow contains a module named Require due dates for submitted issues. This module contains an on-change rule that sets the Due Date field as a mandatory field. You can modify this workflow to make another field mandatory, or copy the code and create a separate workflow that you can use independently.

Last modified: 1 July 2020