How to make Parent Link mandatory in Epics?
Asked by Umesh Kataria:

Hi,

I have configured the portfolio hierarchy in Jira to set initiatives are parents of epics.

I have also enabled the Parent Link (locked) field in Epic screen. It is automatically populated with Initiatives.

I want to make the Parent Link field mandatory. How can I do it?

Please help. My hierarchy configuration looks as below:

Thanks

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/82580i99CCE570ACE63F6C/image-size/large?v=v2&px=999 "image.png")


Answers:
author: Brendan
body: In the end I built automation routines that email the reporter (generally the person who created) every day until they or someone else updates the Parent Link or Epic Link field. The email includes a link to a confluence page on how to do this and also links to the issue that does not have a Parent/Epic link.

Hopefully the new Parent field which replaces the Parent and Epic link fields can be made mandatory!

comments: author: Eric Lee
body: Brendan, did you build automation routines using a cron job with custom code or some Jira provided mechanism? We're looking to solve the exact same problem.


author: Brendan
body: Hi Eric,

Through Jira Automation. Happy to provide the script code routine logic. It's quite a bit in it so maybe easier to email the .json file and you can import and modify it for your Jira projects and other parameters you'd need to change. Alternately I have posted most of it here which also should do the job.

In addition in the 'When: Scheduled' section I had to build/call a jql query to optimise further. I restricted to last 7 days. They get emailed every day for 7 days. After that it's unlikely that they will do anything so manual follow up ever now and then.

project in (*\<Insert the Jira projects you want in scope\>* ) and created \>= -7d and issuetype in (*\<Insert the Jira issue types you want in scope\>* ) and status in (*\<Insert the Jira ++active++ statuses you want in scope\>*)

I did a variant for the Epic Link as well. Pretty similar - replace Parent Link with Epic fields in relevant places.

![Screenshot 2023-11-06 at 17.03.59.png](https://community.atlassian.com/t5/image/serverpage/image-id/290180i378AFE384A6B15E2/image-dimensions/456x566?v=v2 "Screenshot 2023-11-06 at 17.03.59.png")![Screenshot 2023-11-06 at 16.56.33.png](https://community.atlassian.com/t5/image/serverpage/image-id/290181i19DE08EACB6B68DC/image-dimensions/454x272?v=v2 "Screenshot 2023-11-06 at 16.56.33.png")![Screenshot 2023-11-06 at 17.04.16.png](https://community.atlassian.com/t5/image/serverpage/image-id/290183iD9F5286FE443574B/image-dimensions/448x393?v=v2 "Screenshot 2023-11-06 at 17.04.16.png")


author: Olli Suokas
body: You cannot make Parent Link a mandatory field with Field Configuration but what you can do is, add a validator to check if Parent Link field has a value or not during a transition.

I've added a validator from Create Issue to Open transition.

Sadly, you're not going to get the red asterisk to show end-users that the field is required but you can add an error message to the validator which is shown if the user tries to create an Epic without Parent Link.

Again the downside of the error message is that its displayed on top of the Create Issue screen of your Epic and if the screen is long, you won't see the error unless you scroll up to see it :/.

Hopefully this helps your or others googling the same question!


Tags: advanced-roadmaps

cloud