How to make the Epic Link field required/mandatory on the issue create screen in company-managed projects
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Purpose
There may be cases in which you only wish users to create issues if they have filled out the Epic Link field. Because Epic Link is a locked field, it is not possible to do this by modifying field behaviour in a field configuration. You can however make the Epic Link field required by using a Field Required workflow validator.
Solution
Be aware that the following changes will be reflected in all projects that share the workflow you edit. Also, you must make sure that the Epic Link field has been added to your create screen. If the field is not present on the screen and you make it required, users will not be able to create issues.
- Go to your company-managed project, Project settings > Workflows
- Click the pencil icon to edit the workflow
- Click on the Diagram tab and then click on the 'Create' transition line and click Validators from the pop-up screen:
- Click 'Add validator' and then select "Field Required Validator"
- Choose "Epic Link" for "Fields required for this transition"
- Enter an error message which will be visible to the user. We recommend including "(Required by workflow)" in the error message so the source of the error is clear to your team:
- Click Add
- Click Publish Draft:
With the above workflow validator set up, this is this is how the issue create screen looks if I click Create without filling out the Epic Link field:
Note: There is no red asterisk next to the Epic Link field, because it is required by a workflow validator (rather than being made required in a Field Configuration). There is a feature request to add such UI highlight, here: JRACLOUD-76479 – Make validator required fields more visible on screens.